Skip to content
Mohammad Javad Afkari edited this page Jul 27, 2017 · 1 revision

Initialize PayIr:

$apiKey = 'test';
$redirectUrl = 'http://localhost:2030/verify.php';
$payIr = new \wmateam\payIr\PayIr($apiKey, $redirectUrl);

Verify transaction:

$verify = $payIr->verifyPayment($_POST['transId']);
$status = $verify->status;
$amount = $verify->amount;

For example

$apiKey = 'test';
$redirectUrl = 'http://localhost:2030/verify.php';
$payIr = new \wmateam\payIr\PayIr($apiKey, $redirectUrl);

$verify = $payIr->verifyPayment($_POST['transId']);
$status = $verify->status;
$amount = $verify->amount;
Clone this wiki locally