Simple Iran Internet Payment Gateway (IPG) in PHP
This library includes MellatBank and ZarrinPal classes and new IPGs will be added soon.
$config = ['terminal' => (int) ,
'username' => (str),
'password' => (str) ,
'amount' => (int) ,
'callback' => (str) ,
'order' => (int)];
#Mellat Payment Start: (payment.php)
$ipg = new Mellat();
$ipg->set_config($config);
$return = $ipg->start();
#Mellat Payment Verification: (callback.php)
$ipg = new Mellat();
$ipg->set_config($config);
$return = $ipg->payment_check($_REQUEST);
$config = ['merchantid' => 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'(str),
'amount' => (int) ,
'callback' => (str) ,
'order' => (int),
'additionalData' => (str)];
$ipg = new Zarinpal();
$ipg->set_config($config);
$return = $ipg->start();
$ipg = new Zarinpal();
$ipg->set_config($config);
$return = $ipg->payment_check($_REQUEST);