PHPackages                             farshadfahimi/gateway - 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. farshadfahimi/gateway

ActiveLibrary[Payment Processing](/categories/payments)

farshadfahimi/gateway
=====================

A Laravel package for connecting to all Iraninan payment gateways

3.4.2(6y ago)02MITPHP

Since May 2Pushed 4y agoCompare

[ Source](https://github.com/farshadfahimi/gateway)[ Packagist](https://packagist.org/packages/farshadfahimi/gateway)[ Docs](https://github.com/larabook/gateway)[ RSS](/packages/farshadfahimi-gateway/feed)WikiDiscussions dev Synced 4d ago

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

```
متاسفانه این پکیج دیگر پشتیبانی نمی شود

```

پکیج اتصال به تمامی IPG ها و بانک های ایرانی.

این پکیج با ورژن های ( ۴ و ۵ و ۶ ) لاراول سازگار می باشد

پشتیبانی تنها از درگاهای زیر می باشد:

1. MELLAT
2. SADAD (MELLI)
3. SAMAN
4. PARSIAN
5. PASARGAD
6. ZARINPAL
7. PAYPAL
8. ASAN PARDAKHT
9. PAY.IR ( برای فراخوانی از 'payir' استفاده نمایید)
10. Irankish (**جدید** - برای فراخوانی از 'irankish' استفاده نمایید)

---

**نصب**:

دستورات زیر را جهت نصب دنبال کنید :

**مرحله ۱)**

```
composer require larabook/gateway
```

**مرحله ۲)**

```
تغییرات زیر را در فایل  config/app.php اعمال نمایید:

```

**توجه برای نسخه های لاراول ۶ به بعد این مرحله نیاز به انجام نمی باشد**

```
'providers' => [
  ...
  Larabookir\Gateway\GatewayServiceProvider::class, //  [
  ...
  'Gateway' => Larabookir\Gateway\Gateway::class, // setCallback(url('/bank/response')); // 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();
}
```

و سپس روت با مسیر /bank/response و از نوع post ایجاد نمایید و کد های زیر را در آن قرار دهید :

```
try {

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

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

} catch (\Larabookir\Gateway\Exceptions\RetryException $e) {

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

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

} catch (\Exception $e) {

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

در صورت تمایل جهت همکاری در توسعه :

1. توسعه مستندات پکیج.
2. گزارش باگ و خطا.
3. همکاری در نوشتن ماژول دیگر بانک ها برای این پکیج .

درصورت بروز هر گونه [باگ](https://github.com/larabook/gateway/issues) یا [خطا](https://github.com/larabook/gateway/issues) . ما را آگاه سازید .

این پکیج از پکیج دیگری بنام poolport مشتق شده است اما برخی از عملیات آن متناسب با فریموورک لارول تغییر کرده است

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 71.8% 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

Every ~33 days

Recently: every ~129 days

Total

40

Last Release

2380d ago

Major Versions

1.2 → 2.02016-05-04

2.9.9 → 3.02016-12-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/76da7dd6041c3263fdf84251833ba23fa0a02daf4787665c23ab8227a7e2dea0?d=identicon)[farshadfahimi](/maintainers/farshadfahimi)

---

Top Contributors

[![hpakdaman](https://avatars.githubusercontent.com/u/9606809?v=4)](https://github.com/hpakdaman "hpakdaman (219 commits)")[![honarkhah](https://avatars.githubusercontent.com/u/904829?v=4)](https://github.com/honarkhah "honarkhah (14 commits)")[![amirdew](https://avatars.githubusercontent.com/u/1938899?v=4)](https://github.com/amirdew "amirdew (10 commits)")[![amiriun](https://avatars.githubusercontent.com/u/5228893?v=4)](https://github.com/amiriun "amiriun (7 commits)")[![akoSalman](https://avatars.githubusercontent.com/u/17239230?v=4)](https://github.com/akoSalman "akoSalman (6 commits)")[![imanghafoori1](https://avatars.githubusercontent.com/u/6961695?v=4)](https://github.com/imanghafoori1 "imanghafoori1 (6 commits)")[![mohammad-chavoshipor](https://avatars.githubusercontent.com/u/12573801?v=4)](https://github.com/mohammad-chavoshipor "mohammad-chavoshipor (4 commits)")[![erfansahaf](https://avatars.githubusercontent.com/u/12012168?v=4)](https://github.com/erfansahaf "erfansahaf (4 commits)")[![farshadfahimi](https://avatars.githubusercontent.com/u/20422603?v=4)](https://github.com/farshadfahimi "farshadfahimi (3 commits)")[![mahdi4187](https://avatars.githubusercontent.com/u/25785927?v=4)](https://github.com/mahdi4187 "mahdi4187 (3 commits)")[![vahidalvandi](https://avatars.githubusercontent.com/u/7871623?v=4)](https://github.com/vahidalvandi "vahidalvandi (2 commits)")[![alighasemzadeh-archived](https://avatars.githubusercontent.com/u/85446576?v=4)](https://github.com/alighasemzadeh-archived "alighasemzadeh-archived (2 commits)")[![bluemmb](https://avatars.githubusercontent.com/u/7195720?v=4)](https://github.com/bluemmb "bluemmb (2 commits)")[![jyarali](https://avatars.githubusercontent.com/u/25876572?v=4)](https://github.com/jyarali "jyarali (2 commits)")[![mhndev](https://avatars.githubusercontent.com/u/5164182?v=4)](https://github.com/mhndev "mhndev (2 commits)")[![mohammad6006](https://avatars.githubusercontent.com/u/553379?v=4)](https://github.com/mohammad6006 "mohammad6006 (2 commits)")[![mostafaznv](https://avatars.githubusercontent.com/u/7619687?v=4)](https://github.com/mostafaznv "mostafaznv (2 commits)")[![psobhanlo](https://avatars.githubusercontent.com/u/12683937?v=4)](https://github.com/psobhanlo "psobhanlo (2 commits)")[![saeedsajadi](https://avatars.githubusercontent.com/u/3465334?v=4)](https://github.com/saeedsajadi "saeedsajadi (2 commits)")[![Ahmad110](https://avatars.githubusercontent.com/u/10651421?v=4)](https://github.com/Ahmad110 "Ahmad110 (2 commits)")

---

Tags

laravelportpaymentgatewaypaypalBankpayiranzarinpalPaylineshaparaksamanMelimellatpasargadparsiansadadjahanpayasan pardakhtpardakhtdargahiranian-bankspersian-bankspoolportipaypay-ir

### Embed Badge

![Health badge](/badges/farshadfahimi-gateway/health.svg)

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

###  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)
