A package for simplifying the integration with Iranian banks.
Supported gatways:
- MELLAT
- SADAD (MELLI)
- SAMAN
- PARSIAN
- PASARGAD
- ZARINPAL
- PAYPAL
- ASAN PARDAKHT
- PAY.IR
- SADERAT
- IRANKISH
composer require hpez/gateway
php artisan vendor:publish --provider="Hpez\Gateway\GatewayServiceProvider"
Find the config file at config/gateway.php and change it according to your needs.
$gateway = \Gateway::make(new \Hpez\Gateway\Mellat\Mellat());
$gateway->setCallback("your callback route");
$gateway->setCellNumber("09xxxxxxxxx"); // Optional
$gateway->price($invoiceTotal)->ready();
$refId = $gateway->refId(); // شماره ارجاع بانک
$transactionId = $gateway->transactionId(); // شماره تراکنش
return $gateway->redirect();
$gateway = \Gateway::verify();
$trackingCode = $gateway->trackingCode();
$refId = $gateway->refId();
$cardNumber = $gateway->cardNumber();