wmateam / payir
Pay.ir php package
1.1
2018-05-28 13:46 UTC
Requires
- php: >=5.4
- wmateam/curling: ^0.7.4
Requires (Dev)
- phpunit/phpunit: 4.0.*
This package is not auto-updated.
Last update: 2024-11-10 04:53:26 UTC
README
Pay.ir php package
Wiki and Docs
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;