PHPackages                             shetabit/multipay - 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. shetabit/multipay

ActiveLibrary[Payment Processing](/categories/payments)

shetabit/multipay
=================

PHP Payment Gateway Integration Package

v2.9.2(2mo ago)291348.2k↓40.9%146[7 PRs](https://github.com/shetabit/multipay/pulls)3MITPHPPHP ^8.0

Since Jun 13Pushed 2mo ago7 watchersCompare

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

READMEChangelog (10)Dependencies (16)Versions (126)Used By (3)

[![](resources/images/payment.png?raw=true)](resources/images/payment.png?raw=true)

PHP Payment Gateway
===================

[](#php-payment-gateway)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Latest Version on Packagist](https://camo.githubusercontent.com/46cdec3a3d7018aff7dbf0298d1fe29a1557977a1b5ecfab755cbaa8a8ca1e88/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73686574616269742f6d756c74697061792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shetabit/multipay)[![Total Downloads on Packagist](https://camo.githubusercontent.com/78c2d125d807266f125fa6fe1c45b7a1e6b3772f0d821e6cab1f308a41128cb2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73686574616269742f6d756c74697061792e7376673f636f6c6f723d253233463138267374796c653d666c61742d737175617265)](https://packagist.org/packages/shetabit/multipay)[![StyleCI](https://camo.githubusercontent.com/a612f8dca46a7b41fe4d931c40fa1370d457a1e3433d7436f80148d35b5023fe/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3236383033393638342f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/268039684)[![Maintainability](https://camo.githubusercontent.com/b70384deb562b6dac49aab8874eab6229216cfb55629e35caf6ee1845d5d1641/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f33616137393063353434633966323133326231362f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/shetabit/multipay/maintainability)[![Quality Score](https://camo.githubusercontent.com/ed97ef3920e781c3d86ba07337b56dfbbd38ebad4c7814c7443cb3c7ac914158/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f73686574616269742f6d756c74697061792e7376673f6c6162656c3d436f64652532305175616c697479267374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/shetabit/multipay)

This is a PHP Package for Payment Gateway Integration. This package supports `PHP 7.2+`.

[Donate me](https://yekpay.me/mahdikhanzadi) if you like this package 😎 ![:bowtie:](https://github.githubassets.com/images/icons/emoji/bowtie.png ":bowtie:")

For **Laravel** integration you can use [shetabit/payment](https://github.com/shetabit/payment) package.

> This package works with multiple drivers, and you can create custom drivers if you can't find them in the [current drivers list](#list-of-available-drivers) (below list).

- [داکیومنت فارسی](README-FA.md)
- [English documents](README.md)
- [中文文档](README-ZH.md)

List of contents
================

[](#list-of-contents)

- [PHP Payment Gateway](#php-payment-gateway)
- [List of contents](#list-of-contents)
- [List of available drivers](#list-of-available-drivers)
    - [Install](#install)
    - [Configure](#configure)
    - [How to use](#how-to-use)
        - [Working with invoices](#working-with-invoices)
        - [Purchase invoice](#purchase-invoice)
        - [Pay invoice](#pay-invoice)
        - [Verify payment](#verify-payment)
        - [Useful methods](#useful-methods)
        - [Create custom drivers:](#create-custom-drivers)
        - [Events](#events)
    - [Local driver (for development)](#local-driver)
    - [Change log](#change-log)
    - [Contributing](#contributing)
    - [Security](#security)
    - [Credits](#credits)
    - [License](#license)

List of available drivers
=========================

[](#list-of-available-drivers)

- [aqayepardakht](https://aqayepardakht.ir/) ✔️
- [asanpardakht](https://asanpardakht.ir/) ✔️
- [atipay](https://www.atipay.net/) ✔️
- [azkiVam (Installment payment)](https://www.azkivam.com/) ✔️
- [behpardakht (mellat)](http://www.behpardakht.com/) ✔️
- [bitpay](https://bitpay.ir/) ✔️
- [daracard](https://daracard.co/) ✔️
- [digipay](https://www.mydigipay.com/) ✔️
- [etebarino (Installment payment)](https://etebarino.com/) ✔️
- [fanavacard](https://www.fanava.com/) ✔️
- [gooyapay](https://gooyapay.ir/) ✔️
- [irandargah](https://irandargah.com/) ✔️
- [irankish](http://irankish.com/) ✔️
- [jibit](https://jibit.ir/) ✔️
- [local](#local-driver) ✔️
- [minipay](https://minipay.me/) ✔️
- [nextpay](https://nextpay.ir/) ✔️
- [omidpay](https://omidpayment.ir/) ✔️
- [parsian](https://www.pec.ir/) ✔️
- [parspal](https://parspal.com/) ✔️
- [pasargad](https://bpi.ir/) ✔️
- [panapal](https://panapal.ir/) ✔️
- [payfa](https://payfa.com/) ✔️
- [paypal](http://www.paypal.com/) (will be added soon in next version)
- [payping](https://www.payping.ir/) ✔️
- [paystar](http://paystar.ir/) ✔️
- [poolam](https://poolam.ir/) ✔️
- [pna](https://www.pna.co.ir/) ✔️
- [rayanpay](https://rayanpay.com/) ✔️
- [sadad (melli)](https://sadadpsp.ir/) ✔️
- [saman](https://www.sep.ir) ✔️
- [sep (saman electronic payment) Keshavarzi &amp; Saderat](https://www.sep.ir) ✔️
- [sepehr (saderat)](https://www.sepehrpay.com/) ✔️
- [sepordeh](https://sepordeh.com/) ✔️
- [shepa](https://shepa.com/) ✔️
- [sizpay](https://www.sizpay.ir/) ✔️
- [snapppay](https://snapppay.ir/) ✔️
- [toman](https://tomanpay.net/) ✔️
- [vandar](https://vandar.io/) ✔️
- [yekpay](https://yekpay.com/) ✔️
- [zarinpal](https://www.zarinpal.com/) ✔️
- [zibal](https://www.zibal.ir/) ✔️
- [novinopay](https://novinopay.com/) ✔️
- [stripe](https://stripe.com/) ✔️
- [xendit](https://xendit.co/) ✔️
- Others are under way.

**Help me to add the gateways below by creating `pull requests`**

- authorize
- 2checkout
- braintree
- skrill
- payU
- amazon payments
- wepay
- payoneer
- paysimple

> you can create your own custom drivers if it doesn't exist in the list, read the `Create custom drivers` section.

Install
-------

[](#install)

Via Composer

```
composer require shetabit/multipay
```

Configure
---------

[](#configure)

a. Copy `config/payment.php` into somewhere in your project. (you can also find it in `vendor/shetabit/multipay/config/payment.php` path).

b. In the config file you can set the `default driver` to be used for all your payments and you can also change the driver at runtime.

Choose what gateway you would like to use in your application. Then make that as default driver so that you don't have to specify that everywhere. But, you can also use multiple gateways in a project.

```
// Eg. if you want to use zarinpal.
'default' => 'zarinpal',
```

Then fill the credentials for that gateway in the drivers array.

```
'drivers' => [
    'zarinpal' => [
        // Fill in the credentials here.
        'apiPurchaseUrl' => 'https://www.zarinpal.com/pg/rest/WebGate/PaymentRequest.json',
        'apiPaymentUrl' => 'https://www.zarinpal.com/pg/StartPay/',
        'apiVerificationUrl' => 'https://www.zarinpal.com/pg/rest/WebGate/PaymentVerification.json',
        'merchantId' => '',
        'callbackUrl' => 'http://yoursite.com/path/to',
        'description' => 'payment in '.config('app.name'),
    ],
    ...
]
```

c. Instantiate the `Payment` class and **pass configs to it** like the below:

```
    use Shetabit\Multipay\Payment;

    // load the config file from your project
    $paymentConfig = require('path/to/payment.php');

    $payment = new Payment($paymentConfig);
```

How to use
----------

[](#how-to-use)

your `Invoice` holds your payment details, so initially we'll talk about `Invoice` class.

#### Working with invoices

[](#working-with-invoices)

before doing any thing you need to use `Invoice` class to create an invoice.

In your code, use it like the below:

```
// At the top of the file.
use Shetabit\Multipay\Invoice;
...

// Create new invoice.
$invoice = new Invoice;

// Set invoice amount.
$invoice->amount(1000);

// Add invoice details: There are 4 syntax available for this.
// 1
$invoice->detail(['detailName' => 'your detail goes here']);
// 2
$invoice->detail('detailName','your detail goes here');
// 3
$invoice->detail(['name1' => 'detail1','name2' => 'detail2']);
// 4
$invoice->detail('detailName1','your detail1 goes here')
        ->detail('detailName2','your detail2 goes here');
```

Available methods:

- `uuid`: set the invoice unique id
- `getUuid`: retrieve the invoice current unique id
- `detail`: attach some custom details into invoice
- `getDetails`: retrieve all custom details
- `amount`: set the invoice amount
- `getAmount`: retrieve invoice amount
- `transactionId`: set invoice payment transaction id
- `getTransactionId`: retrieve payment transaction id
- `via`: set a driver we use to pay the invoice
- `getDriver`: retrieve the driver

#### Purchase invoice

[](#purchase-invoice)

In order to pay the invoice, we need the payment transactionId. We purchase the invoice to retrieve transaction id:

```
// At the top of the file.
use Shetabit\Multipay\Invoice;
use Shetabit\Multipay\Payment;
...

// load the config file from your project
$paymentConfig = require('path/to/payment.php');

$payment = new Payment($paymentConfig);

// Create new invoice.
$invoice = (new Invoice)->amount(1000);

// Purchase the given invoice.
$payment->purchase($invoice,function($driver, $transactionId) {
	// We can store $transactionId in database.
});

// Purchase method accepts a callback function.
$payment->purchase($invoice, function($driver, $transactionId) {
    // We can store $transactionId in database.
});

// You can specify callbackUrl
$payment->callbackUrl('http://yoursite.com/verify')->purchase(
    $invoice,
    function($driver, $transactionId) {
    	// We can store $transactionId in database.
	}
);
```

#### Pay invoice

[](#pay-invoice)

After purchasing the invoice, we can redirect the user to the bank payment page:

```
// At the top of the file.
use Shetabit\Multipay\Invoice;
use Shetabit\Multipay\Payment;
...

// load the config file from your project
$paymentConfig = require('path/to/payment.php');

$payment = new Payment($paymentConfig);

// Create new invoice.
$invoice = (new Invoice)->amount(1000);

// Purchase and pay the given invoice.
// You should use return statement to redirect user to the bank page.
return $payment->purchase($invoice, function($driver, $transactionId) {
    // Store transactionId in database as we need it to verify payment in the future.
})->pay()->render();

// Do all things together in a single line.
return $payment->purchase(
    (new Invoice)->amount(1000),
    function($driver, $transactionId) {
    	// Store transactionId in database.
        // We need the transactionId to verify payment in the future.
	}
)->pay()->render();

// Retrieve json format of Redirection (in this case you can handle redirection to bank gateway)
return $payment->purchase(
    (new Invoice)->amount(1000),
    function($driver, $transactionId) {
    	// Store transactionId in database.
        // We need the transactionId to verify payment in the future.
	}
)->pay()->toJson();
```

#### Verify payment

[](#verify-payment)

When user has completed the payment, the bank redirects them to your website, then you need to **verify your payment** in order to ensure the `invoice` has been **paid**.

```
// At the top of the file.
use Shetabit\Multipay\Payment;
use Shetabit\Multipay\Exceptions\InvalidPaymentException;
...

// load the config file from your project
$paymentConfig = require('path/to/payment.php');

$payment = new Payment($paymentConfig);

// You need to verify the payment to ensure the invoice has been paid successfully.
// We use transaction id to verify payments
// It is a good practice to add invoice amount as well.
try {
	$receipt = $payment->amount(1000)->transactionId($transaction_id)->verify();

    // You can show payment referenceId to the user.
    echo $receipt->getReferenceId();

    // And also you can access verify receipt detail
    echo $receipt->getDetail('give-a-name')
    // Or if you want all details
    $receiptDetails = $receipt->getDetails()
    ...
} catch (InvalidPaymentException $exception) {
    /**
    	when payment is not verified, it will throw an exception.
    	We can catch the exception to handle invalid payments.
    	getMessage method, returns a suitable message that can be used in user interface.
    **/
    echo $exception->getMessage();
}
```

#### Useful methods

[](#useful-methods)

- ###### `callbackUrl`: can be used to change callbackUrl on the runtime.

    [](#callbackurl-can-be-used-to-change-callbackurl-on-the-runtime)

    ```
    // At the top of the file.
    use Shetabit\Multipay\Invoice;
    use Shetabit\Multipay\Payment;
    ...

    // load the config file from your project
    $paymentConfig = require('path/to/payment.php');

    $payment = new Payment($paymentConfig);

    // Create new invoice.
    $invoice = (new Invoice)->amount(1000);

    // Purchase the given invoice.
    $payment->callbackUrl($url)->purchase(
        $invoice,
        function($driver, $transactionId) {
        // We can store $transactionId in database.
    	}
    );
    ```
- ###### `amount`: you can set the invoice amount directly

    [](#amount-you-can-set-the-invoice-amount-directly)

    ```
    // At the top of the file.
    use Shetabit\Multipay\Invoice;
    use Shetabit\Multipay\Payment;
    ...

    // load the config file from your project
    $paymentConfig = require('path/to/payment.php');

    $payment = new Payment($paymentConfig);

    // Purchase (we set invoice to null).
    $payment->callbackUrl($url)->amount(1000)->purchase(
        null,
        function($driver, $transactionId) {
        // We can store $transactionId in database.
    	}
    );
    ```
- ###### `via`: change driver on the fly

    [](#via-change-driver-on-the-fly)

    ```
    // At the top of the file.
    use Shetabit\Multipay\Invoice;
    use Shetabit\Multipay\Payment;
    ...

    // load the config file from your project
    $paymentConfig = require('path/to/payment.php');

    $payment = new Payment($paymentConfig);

    // Create new invoice.
    $invoice = (new Invoice)->amount(1000);

    // Purchase the given invoice.
    $payment->via('driverName')->purchase(
        $invoice,
        function($driver, $transactionId) {
        // We can store $transactionId in database.
    	}
    );
    ```
- ###### `config`: set driver configs on the fly

    [](#config-set-driver-configs-on-the-fly)

    ```
    // At the top of the file.
    use Shetabit\Multipay\Invoice;
    use Shetabit\Multipay\Payment;
    ...

    // load the config file from your project
    $paymentConfig = require('path/to/payment.php');

    $payment = new Payment($paymentConfig);

    // Create new invoice.
    $invoice = (new Invoice)->amount(1000);

    // Purchase the given invoice with custom driver configs.
    $payment->config('mechandId', 'your mechand id')->purchase(
        $invoice,
        function($driver, $transactionId) {
        // We can store $transactionId in database.
    	}
    );
    ```

// We can also change multiple config values at the same time. // To use wages in Zarinpal, you can configure it as shown in the example below. $payment-&gt;config(\['wages' =&gt; \[use Zarinpal documentation for values\], 'key1' =&gt; 'value1', 'key2' =&gt; 'value2'\])-&gt;purchase( $invoice, function ($driver, $transactionId) { // We can store $transactionId in the database. } );

```
- `custom fileds`: Use custom fields of gateway (Not all gateways support this feature)
SEP gateway support up to 4 custom fields and you can set the value to a string up to 50 characters.
These custom fields are shown only when viewing reports in the user's panel.

```php
// At the top of the file.
use Shetabit\Multipay\Invoice;
...

// Create new invoice.
$invoice = (new Invoice)->amount(1000);

// Use invoice bag to store custom field values.
$invoice->detail([
            'ResNum1' => $order->orderId,
            'ResNum2' => $customer->verifiedCode,
            'ResNum3' => $someValue,
            'ResNum4' => $someOtherValue,
            ]);

```

#### Create custom drivers:

[](#create-custom-drivers)

First you have to add the name of your driver, in the drivers array and also you can specify any config parameters you want.

```
'drivers' => [
    'zarinpal' => [...],
    'my_driver' => [
        ... // Your Config Params here.
    ]
]
```

Now you have to create a Driver Map Class that will be used to pay invoices. In your driver, You just have to extend `Shetabit\Multipay\Abstracts\Driver`.

Eg. You created a class: `App\Packages\Multipay\Driver\MyDriver`.

```
namespace App\Packages\Multipay\Driver;

use Shetabit\Multipay\Abstracts\Driver;
use Shetabit\Multipay\Exceptions\InvalidPaymentException;
use Shetabit\Multipay\{Contracts\ReceiptInterface, Invoice, RedirectionForm, Receipt};

class MyDriver extends Driver
{
    protected $invoice; // Invoice.

    protected $settings; // Driver settings.

    public function __construct(Invoice $invoice, $settings)
    {
        $this->invoice($invoice); // Set the invoice.
        $this->settings = (object) $settings; // Set settings.
    }

    // Purchase the invoice, save its transactionId and finaly return it.
    public function purchase() {
        // Request for a payment transaction id.
        ...

        $this->invoice->transactionId($transId);

        return $transId;
    }

    // Redirect into bank using transactionId, to complete the payment.
    public function pay() : RedirectionForm {
        // It is better to set bankApiUrl in config/payment.php and retrieve it here:
        $bankUrl = $this->settings->bankApiUrl; // bankApiUrl is the config name.

        // Prepare payment url.
        $payUrl = $bankUrl.$this->invoice->getTransactionId();

        // Redirect to the bank.
        $url = $payUrl;
        $inputs = [];
        $method = 'GET';

        return $this->redirectWithForm($url, $inputs, $method);
    }

    // Verify the payment (we must verify to ensure that user has paid the invoice).
    public function verify(): ReceiptInterface {
        $verifyPayment = $this->settings->verifyApiUrl;

        $verifyUrl = $verifyPayment.$this->invoice->getTransactionId();

        ...

        /**
			Then we send a request to $verifyUrl and if payment is not valid we throw an InvalidPaymentException with a suitable message.
        **/
        throw new InvalidPaymentException('a suitable message');

        /**
        	We create a receipt for this payment if everything goes normally.
        **/
        return new Receipt('driverName', 'payment_receipt_number');
    }
}
```

Once you create that class you have to specify it in the `payment.php` config file `map` section.

```
'map' => [
    ...
    'my_driver' => App\Packages\Multipay\Driver\MyDriver::class,
]
```

**Note:** You have to make sure that the key of the `map` array is identical to the key of the `drivers` array.

#### Events:

[](#events)

**Notice 1:** event listeners will be registered globaly for all payments.

**Notice 2:** if you want your listeners work correctly, you **must** subcribe them before the target event dispatches.

> Its better to subcribe events in your app's entry point or main service provider, so events will be subcribed before any events dispatches.

---

You can listen for 3 events:

1. **purchase**
2. **pay**
3. **verify**.

- **purchase**: Occurs when an invoice is purchased (after purchasing invoice is done successfully).

```
// add purchase event listener
Payment::addPurchaseListener(function($driver, $invoice) {
    echo $driver;
    echo $invoice;
});
```

- **pay**: Occurs when an invoice is prepared to pay.

```
// add pay event listener
Payment::addPayListener(function($driver, $invoice) {
    echo 'first listener';
});

// we can add multiple listeners
Payment::addPayListener(function($driver, $invoice) {
    echo 'second listener';
});
```

- **verify**: Occurs when an invoice is verified successfully.

```
// we can add multiple listeners and also remove them!!!

$firstListener = function($driver, $invoice) {
    echo 'first listener';
};

$secondListener = function($driver, $invoice) {
    echo 'second listener';
};

Payment::addVerifyListener($firstListener);
Payment::addVerifyListener($secondListener);

// remove first listener
Payment::removeVerifyListener($firstListener);

// if we call remove listener without any arguments, it will remove all listeners
Payment::removeVerifyListener(); // remove all verify listeners :D
```

Local driver
------------

[](#local-driver)

`Local` driver can simulate payment flow of a real gateway for development purpose.

Payment can be initiated like any other driver

```
$invoice = (new Invoice)->amount(10000);
$payment->via('local')->purchase($invoice, function($driver, $transactionId) {
    // a fake transaction ID is generated and returned.
})->pay()->render();
```

[![](resources/images/local-form.png?raw=true)](resources/images/local-form.png?raw=true)

Calling `render()` method will render a `HTML` form with **Accept** and **Cancel** buttons, which simulate corresponding action of real payment gateway. and redirects to the specified callback url. `transactionId` parameter will allways be available in the returned query url.

Payment can be verified after receiving the callback request.

```
$receipt = $payment->via('local')->verify();
```

In case of succesful payment, `$receipt` will contains the following parameters

```
[
'orderId' => // fake order number
'traceNo' => // fake trace number (this should be stored in databse)
'referenceNo' => // generated transaction ID in `purchase` method callback
'cardNo' => // fake last four digits of card
]
```

In case of canceled payment, `PurchaseFailedException` will be thrown to simulate the failed verification of gateway.

Driver functionalities can be configured via `Invoice` detail bag.

- ###### `available parameters`

    [](#available-parameters)

```
$invoice->detail([
    // setting this value will cause `purchase` method to throw an `PurchaseFailedException`
    // to simulate when a gateway can not initialize the payment.
        'failedPurchase' => 'custom message to decribe the error',

    // Setting this parameter will be shown in payment form.
        'orderId' => 4444,
]);
```

- ###### `appearance`

    [](#appearance)

Appearance of payment form can be customized via config parameter of `local` driver in `payment.php` file.

```
'local' => [
    // default callback url of the driver
    'callbackUrl' => '/callback',

    // main title of the form
    'title' => 'Test gateway',

    // a description to show under the title for more clarification
    'description' => 'This gateway is for using in development environments only.',

    // custom label to show as order No.
    'orderLabel' => 'Order No.',

    // custom label to show as payable amount
    'amountLabel' => 'Payable amount',

    // custom label of successful payment button
    'payButton' => 'Successful Payment',

    // custom label of cancel payment button
    'cancelButton' => 'Cancel Payment',
],
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has been changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Mahdi khanzadi](https://github.com/khanzadimahdi)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

67

—

FairBetter than 100% of packages

Maintenance86

Actively maintained with recent releases

Popularity56

Moderate usage in the ecosystem

Community37

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor4

4 contributors hold 50%+ of commits

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 ~17 days

Recently: every ~23 days

Total

121

Last Release

69d ago

Major Versions

v1.58.0 → v2.0.02025-01-20

PHP version history (2 changes)v1.0PHP &gt;=7.2

v2.0.0PHP ^8.0

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/9d73b855df70ba50a46d879126a3f32fb173d12ca3e778e0a72b7398cbef8a26?d=identicon)[shetabit](/maintainers/shetabit)

---

Top Contributors

[![khanzadimahdi](https://avatars.githubusercontent.com/u/6291970?v=4)](https://github.com/khanzadimahdi "khanzadimahdi (35 commits)")[![bahramsadin](https://avatars.githubusercontent.com/u/24217539?v=4)](https://github.com/bahramsadin "bahramsadin (19 commits)")[![alissn](https://avatars.githubusercontent.com/u/26966142?v=4)](https://github.com/alissn "alissn (13 commits)")[![iamammiin](https://avatars.githubusercontent.com/u/23165622?v=4)](https://github.com/iamammiin "iamammiin (11 commits)")[![hsharghi](https://avatars.githubusercontent.com/u/2873823?v=4)](https://github.com/hsharghi "hsharghi (8 commits)")[![sadegh19b](https://avatars.githubusercontent.com/u/54643531?v=4)](https://github.com/sadegh19b "sadegh19b (6 commits)")[![parsagholipour](https://avatars.githubusercontent.com/u/57809920?v=4)](https://github.com/parsagholipour "parsagholipour (6 commits)")[![hamog](https://avatars.githubusercontent.com/u/11465084?v=4)](https://github.com/hamog "hamog (4 commits)")[![YahyaKng](https://avatars.githubusercontent.com/u/40827402?v=4)](https://github.com/YahyaKng "YahyaKng (3 commits)")[![ariaieboy](https://avatars.githubusercontent.com/u/15873972?v=4)](https://github.com/ariaieboy "ariaieboy (3 commits)")[![asgarihope](https://avatars.githubusercontent.com/u/148297745?v=4)](https://github.com/asgarihope "asgarihope (3 commits)")[![hos3ein](https://avatars.githubusercontent.com/u/6175800?v=4)](https://github.com/hos3ein "hos3ein (3 commits)")[![MeysamFallah](https://avatars.githubusercontent.com/u/22551516?v=4)](https://github.com/MeysamFallah "MeysamFallah (3 commits)")[![mohammadv184](https://avatars.githubusercontent.com/u/77800167?v=4)](https://github.com/mohammadv184 "mohammadv184 (3 commits)")[![saprenco](https://avatars.githubusercontent.com/u/51704286?v=4)](https://github.com/saprenco "saprenco (3 commits)")[![tnateghi](https://avatars.githubusercontent.com/u/19211755?v=4)](https://github.com/tnateghi "tnateghi (3 commits)")[![soheylfarzane](https://avatars.githubusercontent.com/u/54146841?v=4)](https://github.com/soheylfarzane "soheylfarzane (2 commits)")[![mohammadapr](https://avatars.githubusercontent.com/u/33593620?v=4)](https://github.com/mohammadapr "mohammadapr (2 commits)")[![soroux](https://avatars.githubusercontent.com/u/79330987?v=4)](https://github.com/soroux "soroux (2 commits)")[![AliN11](https://avatars.githubusercontent.com/u/16048964?v=4)](https://github.com/AliN11 "AliN11 (2 commits)")

---

Tags

gatewaypaymentpayment-gatewayphpphp-paymentpaymentgatewaypaypalBankpaypayment gatewayzarinpalshetabitPaylineshaparaksamanMelimellatpasargadparsiansadadjahanpaymellisaderatirankishsaderat payment gatewayjibitiranKish payment gatewayjahanPay payment gatewayjibit payment gatewaymellat payment gatewayparsian payment gatewaypasargad payment gatewaypay payment gatewaypayline payment gatewaysadad payment gatewaysaman payment gatewayzarinpal payment gatewayshaparak payment gatewaymeli payment gatewaypaypal payment gatewayphp payment packagephp payment gatewayphp iranKish packagephp iranKishphp jahanPay packagephp jahanPayphp jibit packagephp jibitphp mellat packagephp mellatphp parsian packagephp parsianphp pasargad packagephp pasargadphp pay packagephp payphp payline packagephp paylinephp sadad packagephp sadadphp saderat packagephp saderatphp saman packagephp samanphp zarinpal packagephp zarinpalphp shaparak packagephp shaparakphp meli packagephp meliphp melli bank payment packagephp paypal packagephp paypalasan pardakhtphp asan pardakht

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/shetabit-multipay/health.svg)

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

###  Alternatives

[shetabit/payment

Laravel Payment Gateway Integration Package

944330.1k5](/packages/shetabit-payment)[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)

PHPackages © 2026

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