PHP code example of gmbfgp / uabpayment

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

    

gmbfgp / uabpayment example snippets

bash
php artisan vendor:publish --tag=uabpayment-config
bash
use App\Services\UabPaymentService;

$uab = new UabPaymentService();

$form = $uab->uab(15000, [
        'BillToForename' => 'John',
        'BillToSurname' => 'Depp',
        'BillToPhone' => '9591234567',
        'BillToEmail' => '[email protected]',
]);

// Blade View
<form method="POST" action="{{ $form['url'] }}">
    {!! $form['values'] !!}
    <button type="submit">Pay Now</button>
</form>
bash
//input
$token = $uabService->getLoginToken();

//output
'eyJhbGciOi...dXNzIn0.abc123' or null