PHPackages                             mratwan/bankgateway - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. mratwan/bankgateway

ActiveLibrary[Payment Processing](/categories/payments)

mratwan/bankgateway
===================

A Laravel package for connecting to all Iraninan payment gateways

v1.0.0.x-dev(5y ago)03MITPHP

Since Apr 23Pushed 5y agoCompare

[ Source](https://github.com/mratwan/bankgateway)[ Packagist](https://packagist.org/packages/mratwan/bankgateway)[ Docs](https://github.com/mratwan/bankgateway)[ RSS](/packages/mratwan-bankgateway/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (2)Used By (0)

by this package we are able to connect to all Iranian bank with one unique API.

( This Package is now compatible with both **4.\*, 5.\*, 6.\* and 7.\* versions of Laravel** )

Please inform us once you've encountered [bug](https://github.com/mratwan/bankgateway/issues) or [issue](https://github.com/mratwan/bankgateway/issues) .

Available Banks:

1. MELLAT
2. SADAD (MELLI)
3. SAMAN
4. PARSIAN
5. PASARGAD
6. ZARINPAL
7. PAYPAL (**New**)
8. ASAN PARDAKHT (**New**)
9. PAY.IR (**New**) (to use : new \\Payir())

---

**Installation**:

Run below statements on your terminal :

STEP 1 :

```
composer require mratwan/bankgateway

```

STEP 2 : Add `provider` and `facade` in config/app.php

```
'providers' => [
  ...
  MrAtwan\BankGateway\GatewayServiceProvider::class, //  [
  ...
  'Gateway' => MrAtwan\BankGateway\Gateway::class, // setCallback(url('/path/to/callback/route')); You can also change the callback
   $gateway
        ->price(1000)
        // setShipmentPrice(10) // optional - just for paypal
        // setProductName("My Product") // optional - just for paypal
        ->ready();

   $refId =  $gateway->refId(); // شماره ارجاع بانک
   $transID = $gateway->transactionId(); // شماره تراکنش

  // در اینجا
  //  شماره تراکنش  بانک را با توجه به نوع ساختار دیتابیس تان
  //  در جداول مورد نیاز و بسته به نیاز سیستم تان
  // ذخیر کنید .

   return $gateway->redirect();

} catch (\Exception $e) {

   	echo $e->getMessage();
}

```

you can call the gateway by these ways :

1. Gateway::make(new Mellat());
2. Gateway::mellat()
3. app('gateway')-&gt;make(new Mellat());
4. app('gateway')-&gt;mellat();

Instead of MELLAT you can enter other banks Name as we introduced above .

In `price` method you should enter the price in IRR (RIAL)

and in your callback :

```
try {

   $gateway = \Gateway::verify();
   $trackingCode = $gateway->trackingCode();
   $refId = $gateway->refId();
   $cardNumber = $gateway->cardNumber();

    // تراکنش با موفقیت سمت بانک تایید گردید
    // در این مرحله عملیات خرید کاربر را تکمیل میکنیم

} catch (\MrAtwan\BankGateway\Exceptions\RetryException $e) {

    // تراکنش قبلا سمت بانک تاییده شده است و
    // کاربر احتمالا صفحه را مجددا رفرش کرده است
    // لذا تنها فاکتور خرید قبل را مجدد به کاربر نمایش میدهیم

    echo $e->getMessage() . "";

} catch (\Exception $e) {

    // نمایش خطای بانک
    echo $e->getMessage();
}

```

If you are intrested to developing this package you can help us by these ways :

1. Improving documents.
2. Reporting issue or bugs.
3. Collaboration in writing codes and other banks modules.

This package is extended from PoolPort but we've changed some functionality and improved it .

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1845d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8882dce96335cd5ba6c331c53eb6b7b51c72ec43e5d4509fdbea05eee02172c6?d=identicon)[atwandev](/maintainers/atwandev)

---

Top Contributors

[![atwandev](https://avatars.githubusercontent.com/u/19352053?v=4)](https://github.com/atwandev "atwandev (2 commits)")

---

Tags

laravelportpaymentgatewaypaypalBankpayiranzarinpalPaylineshaparaksamanMelimellatpasargadparsiansadadjahanpayasan pardakhtpardakhtdargahiranian-bankspersian-bankspoolportipaypay-ir

### Embed Badge

![Health badge](/badges/mratwan-bankgateway/health.svg)

```
[![Health](https://phpackages.com/badges/mratwan-bankgateway/health.svg)](https://phpackages.com/packages/mratwan-bankgateway)
```

###  Alternatives

[larabook/gateway

A Laravel package for connecting to all Iraninan payment gateways

24553.7k](/packages/larabook-gateway)[parsisolution/gateway

A Laravel package for connecting to all Iraninan payment gateways

231.7k](/packages/parsisolution-gateway)[shetabit/multipay

PHP Payment Gateway Integration Package

291348.2k3](/packages/shetabit-multipay)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
