Skip to content

Payment

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

New payment:

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

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

For example

$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();
Clone this wiki locally