1. Go to this page and download the library: Download salamzadeh/pb-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/ */
use Salamzadeh\PBPayment\PBPayment;
// Default gateway
$payment = PBPayment::create();
// Select one of available gateways
$payment = PBPayment::create('sadad');
// Test gateway (Would not work on production environment)
$payment = PBPayment::create('test');
// Or use your own gateway
$payment = PBPayment::create(NewGateway::class);
$payment->setUserId($user->id)
->setAmount($data['amount'])
->setCallbackUrl(route('bank.callback'))
->ready();
return $payment->redirect();