PHPackages                             farsh4d/laravel-bank - 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. farsh4d/laravel-bank

ActiveLibrary[Payment Processing](/categories/payments)

farsh4d/laravel-bank
====================

A package to connect to any IPG to make a payment

1.0.0(3y ago)541MITPHP

Since Aug 1Pushed 3y ago1 watchersCompare

[ Source](https://github.com/farsh4d/laravel-bank)[ Packagist](https://packagist.org/packages/farsh4d/laravel-bank)[ RSS](/packages/farsh4d-laravel-bank/feed)WikiDiscussions master Synced 1mo ago

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

Laravel Bank
------------

[](#laravel-bank)

[![Packagist License](https://camo.githubusercontent.com/d49c9ecb915a6ef45ac84a068fc28f857ad53b8e98a407dcda3c637e93cbb70d/68747470733a2f2f706f7365722e707567782e6f72672f666172736834642f6c61726176656c2d62616e6b2f6c6963656e73652e706e67)](http://choosealicense.com/licenses/mit/)[![Latest Stable Version](https://camo.githubusercontent.com/1391fbc17392d46e662dbed5dddf4c61194a8e49807d25596e1e79a55797f6e7/68747470733a2f2f706f7365722e707567782e6f72672f666172736834642f6c61726176656c2d62616e6b2f76657273696f6e2e706e67)](https://packagist.org/packages/farsh4d/laravel-bank)[![Total Downloads](https://camo.githubusercontent.com/8536f9b0615b08073251a596dffc31586181a729da8bbf75776014a5c09e84ca/68747470733a2f2f706f7365722e707567782e6f72672f666172736834642f6c61726176656c2d62616e6b2f642f746f74616c2e706e67)](https://packagist.org/packages/farsh4d/laravel-bank)

This is a package to connect to any Internet Payment Gateways.
This package now only supports `Mellat` IPG for now but we are developing other IPGs ASAP.

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

[](#installation)

Require this package with composer.

```
composer require farsh4d/laravel-bank
```

Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

### Laravel without auto-discovery:

[](#laravel-without-auto-discovery)

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

```
Farsh4d\Bank\Providers\BankServiceProvider::class,
```

#### Copy the package config to your local config with the publish command:

[](#copy-the-package-config-to-your-local-config-with-the-publish-command)

```
php artisan vendor:publish --provider="Farsh4d\Bank\Providers\BankServiceProvider"
```

#### Prepare your database

[](#prepare-your-database)

```
php artisan migrate
```

Usage
-----

[](#usage)

You need 2 routes, one to start a payment and one for callback:

*routes.php*

```
Route::get('/payment-start', 'PaymentController@start')->name('payment_start');
Route::any('/payment-callback', 'PaymentController@callback')->name('payment_callback');
```

> Remember to exclude your callback route from CSRF verification.

In `start` method initialize your desired driver and set required data (price, orderId and callback):

*PaymentController.php @start*

```
$amount = 50000;
$orderId = '123456';

$bankDriver = Bank::driver('Mellat');

$bankDriver->price($amount)
    ->orderId($orderId)
    ->callback(route('payment_callback'));

try {
    $bankDriver->ready();
    return $bankDriver->redirect();
} catch (\Exception $e) {
    // Handle failed transaction initiation; ie:
    return view('payment-error');
}
```

If everything goes right user redirects to IPG and makes a payment and then redirects to your callback.

*PaymentController.php @verify*

```
try {
    Bank::verify();
    // Show transaction success view or do sth else; ie:
    return view('payment-success');
} catch (\Exception $e) {
    // Handle failed payment; ie:
    return view('payment-failed');
}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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

1380d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/98de773adbb3f4833412715866c6d22349c6e814488c50de23409a87c82af640?d=identicon)[farsh4d](/maintainers/farsh4d)

---

Top Contributors

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

---

Tags

laravelpaymentgatewayBankpayment gatewayipginternet payment gateway

### Embed Badge

![Health badge](/badges/farsh4d-laravel-bank/health.svg)

```
[![Health](https://phpackages.com/badges/farsh4d-laravel-bank/health.svg)](https://phpackages.com/packages/farsh4d-laravel-bank)
```

###  Alternatives

[larabook/gateway

A Laravel package for connecting to all Iraninan payment gateways

24553.7k](/packages/larabook-gateway)[omalizadeh/laravel-multi-payment

A driver-based laravel package for online payments via multiple gateways

491.1k](/packages/omalizadeh-laravel-multi-payment)[dena-a/iran-payment

a Laravel package to handle Internet Payment Gateways for Iran Banking System

312.4k1](/packages/dena-a-iran-payment)[parsisolution/gateway

A Laravel package for connecting to all Iraninan payment gateways

231.7k](/packages/parsisolution-gateway)

PHPackages © 2026

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