PHPackages                             mihandev/yii2-mellatbank - 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. mihandev/yii2-mellatbank

ActiveLibrary

mihandev/yii2-mellatbank
========================

you can use this library for bank mellat gateway payments.

1(10y ago)1350[1 issues](https://github.com/mihandev/yii2-mellatbank/issues)MITPHP

Since Nov 26Pushed 10y ago1 watchersCompare

[ Source](https://github.com/mihandev/yii2-mellatbank)[ Packagist](https://packagist.org/packages/mihandev/yii2-mellatbank)[ RSS](/packages/mihandev-yii2-mellatbank/feed)WikiDiscussions v1 Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Iranian bank mellat gateway library
===================================

[](#iranian-bank-mellat-gateway-library)

you can use this library for bank mellat gateway payments.

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist mihandev/yii2-mellatbank "*"

```

or add

```
"mihandev/yii2-mellatbank": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, for show payment button use like this :

```

```

for payment in controller SiteController/actionPay use like this :

```
public function actionPay() {
    $this->layout = false;
    $params = Yii::$app->request->post('MellatBank');
    if($params !== null) {
        $mellatbank = new \mihandev\gateway\MellatBank();
        return $mellatbank->startPayment([
            'terminal' => 000000,
            'username' => 'yourUsername',
            'password' => 'yourPassword',
            'amount' => 1000,
            'callBackUrl' => ['/site/callback']
        ]);
    }
}
```

for verify payment in SiteController/actionCallback use like this:

```
public function actionCallback() {
    $mellatbank = new \mihandev\gateway\MellatBank();
    $config = [
        'terminal' => 000000,
        'username' => 'yourUsername',
        'password' => 'yourPassword',
        'amount' => 1000,
    ];

    $result = $mellatbank->checkPayment($config, $_POST);
    if($result !== null && $result["status"] == "success") {
        // payment is success ...
    }
}
```

###  Health Score

24

↓

LowBetter than 35% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

Every ~6 days

Total

2

Last Release

3764d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/427dbffd9a13eb74a213065bd9e11526e754d0541076484d61dddf8b481b6212?d=identicon)[mihandev](/maintainers/mihandev)

---

Top Contributors

[![ahmadrezaei](https://avatars.githubusercontent.com/u/7928105?v=4)](https://github.com/ahmadrezaei "ahmadrezaei (5 commits)")

---

Tags

yii2extensiongatewaybank mellat

### Embed Badge

![Health badge](/badges/mihandev-yii2-mellatbank/health.svg)

```
[![Health](https://phpackages.com/badges/mihandev-yii2-mellatbank/health.svg)](https://phpackages.com/packages/mihandev-yii2-mellatbank)
```

###  Alternatives

[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1356.4k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

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