PHP code example of devjoaomarcos / paghiper-php-sdk
1. Go to this page and download the library: Download devjoaomarcos/paghiper-php-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/ */
devjoaomarcos / paghiper-php-sdk example snippets
composer
$paghiper = new PagHiper('api_key', 'token', 'píx');
$paghiper->pix()->create([]);
$paghiper->pix()->status('transaction_id');
$paghiper->pix()->cancel('transaction_id');
$paghiper->pix()->notification($_POST['notification_id'], $_POST['idTransacao']);
use WebMaster\PagHiper\PagHiper;
$paghiper = new PagHiper('api_key', 'token');
$transaction = $paghiper->billet()->create([
'order_id' => 'ABC-456-789',
'payer_name' => 'Pedro Lima',
'payer_email' => '[email protected] ',
'payer_cpf_cnpj' => '1234567891011',
'type_bank_slip' => 'boletoa4',
'days_due_date' => '3',
'items' => [[
'description' => 'Macbook',
'quantity' => 1,
'item_id' => 'e24fc781-f543-4591-a51c-dde972e8e0af',
'price_cents' => '1000'
]]
]);
$transaction = $paghiper->billet()->cancel('JKP03X9KN0RELVLH');
$transaction = $paghiper->billet()->status('JKP03X9KN0RELVLH');
$transaction = $paghiper->billet()->multiple([
'id_transacao'
], 'boletoCarne');
$transaction = $paghiper->notification()->response($_POST['notification_id'], $_POST['idTransacao']);
$banckAccounts = $paghiper->banking()->accounts();
$banckAccounts = $paghiper->banking()->withdraw('id_conta_bancaria');