PHPackages                             aryala7/zarinpal - 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. aryala7/zarinpal

ActiveLibrary[Payment Processing](/categories/payments)

aryala7/zarinpal
================

transaction request system for zarinpal

v1.1.4(4y ago)05GPL-2.0-onlyPHP

Since Jul 1Pushed 4y agoCompare

[ Source](https://github.com/aryala7/Composer-Library)[ Packagist](https://packagist.org/packages/aryala7/zarinpal)[ RSS](/packages/aryala7-zarinpal/feed)WikiDiscussions master Synced 1mo ago

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

zarinpal-composer-library
=========================

[](#zarinpal-composer-library)

Transaction request library for zarinpal

\##laravel ready this package is going to work with all kinds of projects, but for laravel i add provider to make it as easy as possible. just add :

```
'providers' => array(
    ...
    'Zarinpal\Laravel\ZarinpalServiceProvider'
    ...
)
```

to providers list in "config/app.php". and run '`php artisan vendor:publish --provider="Zarinpal\Laravel\ZarinpalServiceProvider"`' to add config file to laravel configs directory config it and you are good to go now you can access the zarinpal lib like this:

```
Zarinpal::request("example.com/testVerify.php",1000,'testing');
Zarinpal::verify('OK',1000,$answer['Authority']);
```

\##usage ###installation `composer require atbox/zarinpal`or

```
"require": {
    ...
    "atbox/zarinpal" : "1.*",
    ...
},
```

\###request

```
use Zarinpal\Drivers\Soap;
use Zarinpal\Zarinpal;

$test = new Zarinpal('XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',new soap());
echo json_encode($answer = $test->request("example.com/testVerify.php",1000,'testing'));
if(isset($answer['Authority'])) {
    file_put_contents('Authority',$answer['Authority']);
    $test->redirect();
}
//it will redirect to zarinpal to do the transaction or fail and just echo the errors.
//$answer['Authority'] must save somewhere to do the verification
```

\###verify

```
use Zarinpal\Drivers\Soap;
use Zarinpal\Zarinpal;

$test = new Zarinpal('XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',new soap());
$answer['Authority'] = file_get_contents('Authority');
echo json_encode($test->verify('OK',1000,$answer['Authority']));
//'Status'(index) going to be 'success', 'error' or 'canceled'
```

\##change driver driver can be changed between restAPI , soap and NuSoap with using:

restAPI (recommended):

```
$test = new Zarinpal('XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX');
```

or soap:

```
use Zarinpal\Drivers\Soap;
$test = new Zarinpal('XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',new soap());
```

or nuSoap:

```
use Zarinpal\Drivers\NuSoap;
$test = new Zarinpal('XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',new NuSoap());
```

\##Zaringate for redirect user to Zaringate instead of Zarinpal gateway, pass true as first parameter of redirect method (as default user will redirect to Zarinpal gateway with this method):

```
Zarinpal::redirect(true);
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 64.6% 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 ~500 days

Recently: every ~549 days

Total

6

Last Release

1464d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1f273e450e9053b279301b708ae5fc6d5f477ea86960d224284f4b068efcc19c?d=identicon)[aryala77](/maintainers/aryala77)

---

Top Contributors

[![hoomanna](https://avatars.githubusercontent.com/u/5413073?v=4)](https://github.com/hoomanna "hoomanna (31 commits)")[![sajjadrad](https://avatars.githubusercontent.com/u/1608837?v=4)](https://github.com/sajjadrad "sajjadrad (8 commits)")[![thesoulless](https://avatars.githubusercontent.com/u/1730786?v=4)](https://github.com/thesoulless "thesoulless (2 commits)")[![MA7](https://avatars.githubusercontent.com/u/4957870?v=4)](https://github.com/MA7 "MA7 (2 commits)")[![miladnouri](https://avatars.githubusercontent.com/u/3003901?v=4)](https://github.com/miladnouri "miladnouri (2 commits)")[![zartosht](https://avatars.githubusercontent.com/u/6488633?v=4)](https://github.com/zartosht "zartosht (1 commits)")[![majidgolshadi](https://avatars.githubusercontent.com/u/5164297?v=4)](https://github.com/majidgolshadi "majidgolshadi (1 commits)")[![aryala7](https://avatars.githubusercontent.com/u/56627259?v=4)](https://github.com/aryala7 "aryala7 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aryala7-zarinpal/health.svg)

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

###  Alternatives

[chargebee/chargebee-php

ChargeBee API client implementation for PHP

768.0M9](/packages/chargebee-chargebee-php)[imdhemy/google-play-billing

Google Play Billing

491.3M5](/packages/imdhemy-google-play-billing)[bitpay/sdk

Complete version of the PHP library for the new cryptographically secure BitPay API

42337.5k4](/packages/bitpay-sdk)[buckaroo/sdk

Buckaroo payment SDK

12189.1k9](/packages/buckaroo-sdk)[contica/facturador-electronico-cr

Un facturador de código libre para integrar facturación electrónica en Costa Rica a un proyecto PHP

2128.8k](/packages/contica-facturador-electronico-cr)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)

PHPackages © 2026

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