Skip to content

wmateam/payir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status License

Pay.ir php package

New payment

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

$factorNumber = 'testFactorNumber';//Optional
$amount = 1000;//Rial

$transaction = $payIr->newPayment($amount, $factorNumber);
$transactionID = $transaction->getTransactionID();
$gateway = $transaction->getGateway();

verify transaction

$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;