PHP code example of behzadbabaei / omnipay-thawani
1. Go to this page and download the library: Download behzadbabaei/omnipay-thawani library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$purchase = $gateway->purchase();
$purchase->setAmount(12000);
$purchase->setQuantity(1);
$purchase->setProductName("product name test1"); //Product name is uccess'); //The success url is customer is => $data['customerName'] ?? null,// user full name
]);
$result = $purchase->send();
$response = $result->getData();
$redirectUrl = $result->getRedirectUrl();