PHPackages                             dpsoft/pay.ir - 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. dpsoft/pay.ir

ActiveLibrary[Payment Processing](/categories/payments)

dpsoft/pay.ir
=============

Pay.ir online payment - درگاه پرداخت آسان پرداخت به زبان PHP

v1.0(5y ago)11.3k↑37.5%11MITPHPPHP ^7.1CI failing

Since Jul 7Pushed 3y ago1 watchersCompare

[ Source](https://github.com/dpsoft-official/pay.ir)[ Packagist](https://packagist.org/packages/dpsoft/pay.ir)[ Docs](https://github.com/dpsoft/pay.ir)[ RSS](/packages/dpsoft-payir/feed)WikiDiscussions master Synced 1w ago

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

Pay.ir online payment - درگاه پرداخت Pay.ir به زبان PHP
=======================================================

[](#payir-online-payment---درگاه-پرداخت-payir-به-زبان-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/29db07924b77b752b1263ffedd2830ce0fd12127c63d6da7c3fc306dd2bcbe15/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6470736f66742f7061792e69722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dpsoft/pay.ir)[![Total Downloads](https://camo.githubusercontent.com/f00056024c1f34ac91861d10f1de9c6c3aa1b99a6643bedc6493fc1eb1f2def7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6470736f66742f7061792e69722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dpsoft/pay.ir)

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

[](#installation)

You can install the package via composer:

```
composer require dpsoft/pay.ir
```

Usage
-----

[](#usage)

copy `sample` directory to server. Open `request.php` in browser and bala balah ...

### Request

[](#request)

```
try {
    $pay = new \Dpsoft\Pay\Pay($apiKey);
    $result = $pay->request($callbackUrl,$amount);
    //save amount and invoice id to forther use
    $_SESSION['amount']=$amount;
    $_SESSION['invoice_id']=$result['invoice_id'];

    $pay->redirectToBank();
    exit();
}catch (Throwable $exception){
    echo $exception->getMessage();
}
```

### Response

[](#response)

```
try {
    $pay = new \Dpsoft\Pay\Pay();
    $result = $pay->verify($_SESSION['amount'],$_SESSION['invoice_id']);
    //save result. The keys are: card_number,transaction_id and token for example $result['token']
    echo "Successfull transaction.";
}catch (Throwable $exception){
    echo "Error in transaction: ";
}
```

### Testing

[](#testing)

```
composer test
```

### Security

[](#security)

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

Credits
-------

[](#credits)

- [Dpsoft](https://github.com/dpsoft)

License
-------

[](#license)

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

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

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

2141d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d8ce9db5e47c9f42b80ea1102230d26603ed743596b579011934e7b67b37811d?d=identicon)[dpsoft-ir](/maintainers/dpsoft-ir)

---

Top Contributors

[![SadeghPM](https://avatars.githubusercontent.com/u/9298600?v=4)](https://github.com/SadeghPM "SadeghPM (7 commits)")[![A1Gard](https://avatars.githubusercontent.com/u/9222481?v=4)](https://github.com/A1Gard "A1Gard (1 commits)")

---

Tags

dpsoftpayir

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dpsoft-payir/health.svg)

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

###  Alternatives

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

PHPackages © 2026

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