Internet Payment Gateway Library for Parsian bank (Iran Banking System)
composer require netramz/parsianipg
use Netramz\ParsianIPG\ParsianIPG;
$IPG = new ParsianIPG('MERCHANTID');
$paymentRequest = $IPG->paymentRequest($Amount, $OrderId, $CallBackUrl);
if ($paymentRequest->Status == 'success') {
echo 'https://pec.shaparak.ir/NewIPG/?Token='.$paymentRequest->token;
}else{
//error
}
$confirmPayment = $IPG->confirmPayment($token);
if ($confirmPayment->Status == 'success') {
$Data = [
"status" => $paymentRequest->Status,
"message" => $paymentRequest->message,
"CardNumberMasked" => $paymentRequest->CardNumberMasked,
"RRN" => $paymentRequest->RRN,
];
}else{
//error
}