PHPackages                             viratef/irgateway - 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. viratef/irgateway

ActiveLibrary[Payment Processing](/categories/payments)

viratef/irgateway
=================

A Laravel package for connecting to all Iraninan payment gateways

00PHP

Since Jun 12Pushed 6y agoCompare

[ Source](https://github.com/mfarhadi92/irgateway)[ Packagist](https://packagist.org/packages/viratef/irgateway)[ RSS](/packages/viratef-irgateway/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

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 viratef/gateway

```

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

```
'providers' => [
  ...
  Viratef\Gateway\GatewayServiceProvider::class, //  [
  ...
  'Gateway' => Viratef\Gateway\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 (\Viratef\Gateway\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

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/b46691903cf7e9ee858a246c3bb661281c8afc29f15175c91f4f8b3bb59e7dfe?d=identicon)[mfarhadi92](/maintainers/mfarhadi92)

---

Top Contributors

[![mfarhadi92](https://avatars.githubusercontent.com/u/35996345?v=4)](https://github.com/mfarhadi92 "mfarhadi92 (3 commits)")

### Embed Badge

![Health badge](/badges/viratef-irgateway/health.svg)

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

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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