1. Go to this page and download the library: Download pedrobruning/phpix library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pedrobruning / phpix example snippets
ENDÊNCIAS
use PedroBruning\PhPix\Services\PhPixServiceFactory;
use PedroBruning\PhPix\Services\Providers;
use Symfony\Component\HttpClient\HttpClient;
//INSTÂNCIA
//CRIAÇÃO DO CLIENT: Se o provider que você está utilizando precisa de token de authorization você deve informa-lo na criação do client
$client = HttpClient::create();
$client = $client->withOptions([
'headers' => ['Authorization' => 'YOUR_TOKEN']
]);
$provider = Providers::YourProvider;
$phPixService = PhPixServiceFactory::make($provider, $client);