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

ActiveLibrary[Payment Processing](/categories/payments)

hpez/gateway
============

A Laravel package for using all Iranian payment gateways

v0.6.3(1y ago)2941[1 issues](https://github.com/hpez/gateway/issues)[1 PRs](https://github.com/hpez/gateway/pulls)MITPHPCI failing

Since Nov 28Pushed 1y ago1 watchersCompare

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

READMEChangelog (10)Dependencies (3)Versions (18)Used By (0)

Gateway (پکیج درگاه‌های بانکی ایران)
====================================

[](#gateway-پکیج-درگاه‌های-بانکی-ایران)

[![Latest Version on Packagist](https://camo.githubusercontent.com/851ec5db23090dd1ab2c4ac52b32dfa13c47e2dab02b00eaae5700e16907885e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4870657a2f676174657761792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hpez/gateway)[![Total Downloads](https://camo.githubusercontent.com/a1d07fd4aa47ef6b94d576808a68994e7653f0f1c9b360047c9a0cfb113aee38/68747470733a2f2f706f7365722e707567782e6f72672f6870657a2f676174657761792f646f776e6c6f616473)](https://packagist.org/packages/hpez/gateway)

A package for simplifying the integration with Iranian banks.

Supported gatways:

1. MELLAT
2. SADAD (MELLI)
3. SAMAN
4. PARSIAN
5. PASARGAD
6. ZARINPAL
7. PAYPAL
8. ASAN PARDAKHT
9. PAY.IR
10. SADERAT
11. IRANKISH
12. ZIBAL

Install
-------

[](#install)

### Step 1:

[](#step-1)

```
composer require hpez/gateway
```

### Step 2:

[](#step-2)

```
php artisan vendor:publish --provider="Hpez\Gateway\GatewayServiceProvider"
```

### Step 3:

[](#step-3)

Find the config file at config/gateway.php and change it according to your needs.

Usage example:
--------------

[](#usage-example)

### Redirecting to gateway:

[](#redirecting-to-gateway)

```
$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();
```

### Settling the transaction:

[](#settling-the-transaction)

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

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 53.9% 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 ~117 days

Recently: every ~51 days

Total

17

Last Release

529d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23010096?v=4)[Hassan Pezeshk](/maintainers/hpez)[@hpez](https://github.com/hpez)

---

Top Contributors

[![alighasemzadeh-archived](https://avatars.githubusercontent.com/u/85446576?v=4)](https://github.com/alighasemzadeh-archived "alighasemzadeh-archived (41 commits)")[![hpez](https://avatars.githubusercontent.com/u/23010096?v=4)](https://github.com/hpez "hpez (35 commits)")

---

Tags

gatewaylaravellaravel-packagepaymentlaravelportpaymentgatewaypaypalBankpayiranzarinpalPaylineshaparaksamanMelimellatpasargadparsiansadadjahanpaysaderatirankishasan pardakhtpardakhtdargahiranian-bankspersian-bankspoolportipaypay-ir

### Embed Badge

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

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

###  Alternatives

[larabook/gateway

A Laravel package for connecting to all Iraninan payment gateways

24753.9k](/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

293361.0k4](/packages/shetabit-multipay)

PHPackages © 2026

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