PHP code example of levicosta201 / gerencianet-pix-sdk
1. Go to this page and download the library: Download levicosta201/gerencianet-pix-sdk 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/ */
levicosta201 / gerencianet-pix-sdk example snippets
//Aqui são aceitos dois parâmetros em forma de string, homolog ou production
$connect = new Gerencianet\Pix\Connect('production');
//Aqui você você precisa informar apenas o caminho do seu certificado .pem fornecido pela GN
$connect = $connect->setCertFile('PATH_TO_CERT_FILE')
->setClientId(env('GERENCIA_NET_CLIENT_ID'))
->setClientSecret(env('GERENCIA_NET_CLIENT_SECRET'));
return $connect->proccess();