1. Go to this page and download the library: Download rasulian/laravel-zarinpal 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/ */
// config/zarinpal.php
return [
'params' => [
'merchant-id' => '',
// Leave it empty if you're passing the callback url when doing the request
'callback-url' => '',
// A summary of your product or application, if needed
'description' => '',
],
// Set to true if you want to test the payment in sandbox mode
'testing' => false
];
use Rasulian\ZarinPal\Payment;
class CheckoutConfirmOrderController extends Controller {
/**
* @param $zarinPal
*/
protected $zarinPal;
public function __construct(Payment $zarinPal)
{
...
$this->zarinPal = $zarinPal;
...
}
use Rasulian\ZarinPal\Payment;
class CheckoutPaymentVerificationController extends Controller {
/**
* @param $zarinPal
*/
protected $zarinPal;
public function __construct(Payment $zarinPal)
{
...
$this->zarinPal = $zarinPal;
...
}
...
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.