PHP code example of flromano / paghiper-laravel

1. Go to this page and download the library: Download flromano/paghiper-laravel 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/ */

    

flromano / paghiper-laravel example snippets


Flromano\LaravelPagHiper\PagHiperServiceProvider::class,

'PagHiper' => Flromano\LaravelPagHiper\PagHiperFacade::class,

php artisan vendor:publish --provider=Flromano\LaravelPagHiper\PagHiperServiceProvider

use PagHiper;

$transaction = PagHiper::billet()->create([
    'order_id' => 'ABC-456-789',
    'payer_name' => 'Fernando Romano',
    'payer_email' => '[email protected]',
    'payer_cpf_cnpj' => '1234567891011',
    'type_bank_slip' => 'boletoa4',
    'days_due_date' => '3',
    'items' => [[
        'description' => 'Notebook',
        'quantity' => 1,
        'item_id' => 'e24fc781-f543-4591-a51c-dde972e8e0af',
        'price_cents' => '1000'
    ]]
]);

use PagHiper;

$transaction = PagHiper::billet()->cancel('JKP03X9KN0RELVLH');

use PagHiper;
use Illuminate\Http\Request;

public function notification(Request $request) {
    $transaction = PagHiper::notification()->response($request->notification_id, $request->idTransacao);
}

use PagHiper;

$bankAccounts = PagHiper::bank()->accounts();