PHP code example of infinitypaul / cbs-php
1. Go to this page and download the library: Download infinitypaul/cbs-php 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/ */
infinitypaul / cbs-php example snippets bash
composer
php
Infinitypaul\Cbs\Cbs::setup([
'staging' => 'staging base url',
'live' => 'live base url'],
'Secrey Key',
'Client ID', 'Mode = staging or live');
//To redirect to CBS Payment Gateway
\Infinitypaul\Cbs\CbsCall::addBody('RevenueHeadId', 1)
->addBody('TaxEntityInvoice', [
'Amount' => 1000,
"InvoiceDescription" => "talosopekope",
"AdditionalDetails" => [],
"CategoryId" => 1,
"TaxEntity" => [
'Recipient' => 'Tax Payer',
'Email' => '[email protected] ',
'Address' => 'api Local',
'PhoneNumber' => '0903636363',
'TaxPayerIdentificationNumber' => '736363',
'RCNumber' => null,
'PayerId' => null
]])
->addBody('ExternalRefNumber', 373737373)
->addBody('RequestReference', 'jdjd783')
->addBody('CallBackURL', 'https://coeakwanga.edu.ng/controller/plugin/cbs/verify.php')
->getAuthorizationUrl()
->redirectNow();
//Get Data
\Infinitypaul\Cbs\CbsCall::addBody('RevenueHeadId', 1)
->addBody('TaxEntityInvoice', [
'Amount' => 1000,
"InvoiceDescription" => "talosopekope",
"AdditionalDetails" => [],
"CategoryId" => 1,
"TaxEntity" => [
'Recipient' => 'Tax Payer',
'Email' => '[email protected] ',
'Address' => 'api Local',
'PhoneNumber' => '0903636363',
'TaxPayerIdentificationNumber' => '736363',
'RCNumber' => null,
'PayerId' => null
]])
->addBody('ExternalRefNumber', 373737373)
->addBody('RequestReference', 'jdjd783')
->addBody('CallBackURL', 'https://coeakwanga.edu.ng/controller/plugin/cbs/verify.php')
->getAuthorizationUrl()
->getData();