PHP code example of persgeek / payment
1. Go to this page and download the library: Download persgeek/payment 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/ */
persgeek / payment example snippets
composer
use PG\Payment\Gateways\Zibal;
use PG\Payment\Payload;
$payload = Payload::make()
->setBackUrl('http://localhost')
->setToken('YOUR_MERCHANT')
->setAmount(50000)
->setId(100);
$response = (new Zibal($payload))
->purchase();
print_r($response);
use PG\Payment\Gateways\Zibal;
use PG\Payment\Payload;
$payload = Payload::make()
->setReference('YOUR_REFERENCE')
->setToken('YOUR_MERCHANT');
$response = (new Zibal($payload))
->verify();
print_r($response);