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

ActiveLibrary[Payment Processing](/categories/payments)

laravelified-zarinpal/zarinpal
==============================

transaction request system for zarinpal (Laravel 5.2 ready)

v2.0.4(9y ago)050GPL2PHP

Since Jul 1Pushed 9y ago1 watchersCompare

[ Source](https://github.com/NimaGhaedsharafi/Laravelified-Zarinpal)[ Packagist](https://packagist.org/packages/laravelified-zarinpal/zarinpal)[ RSS](/packages/laravelified-zarinpal-zarinpal/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (3)Versions (11)Used By (0)

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

[](#zarinpal-composer-library)

[![Build Status](https://camo.githubusercontent.com/a117bacdc3fd36c77eec1d6942cc79adc79e70da482aa4e397d9e7d990e6171f/68747470733a2f2f7472617669732d63692e6f72672f52544c65722f7a6172696e70616c2d636f6d706f7365722d6c6962726172792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/RTLer/zarinpal-composer-library)[![StyleCI](https://camo.githubusercontent.com/cfca5f09ce414eca9858a00513d7806e5e41c8307b334c002e346be2131b8cc7/68747470733a2f2f7374796c6563692e696f2f7265706f732f33373933373238302f736869656c64)](https://styleci.io/repos/37937280)[![Coverage Status](https://camo.githubusercontent.com/ae733632fd460a35786edf065a2ef388f8a30f5619fd5f83a6c97aa86dccc555/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f52544c65722f7a6172696e70616c2d636f6d706f7365722d6c6962726172792f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/RTLer/zarinpal-composer-library?branch=master)

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 these two line of declaration to config/app.php:

```
'providers' => [
    ...
    Zarinpal\Laravel\ZarinpalServiceProvider::class
    ...
];
'aliases' => [
	...
    'Zarinpal' => Zarinpal\Laravel\Facade\Zarinpal::class,
];
```

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:

```
use Zarinpal;

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

\##usage ###installation `composer require laravelified-zarinpal/zarinpal`or

```
"require": {
    ...
    "laravelified-zarinpal//zarinpal" : "^2",
    ...
},
```

\###request

```
use Zarinpal;

$test = new Zarinpal('XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX');
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;

$test = new Zarinpal('XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX');
$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\SoapDriver;
$test = new Zarinpal('XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',new soapDriver());
```

or nuSoap:

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

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 82.7% 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 ~56 days

Recently: every ~11 days

Total

8

Last Release

3622d ago

Major Versions

v1.1.3 → v2.0.02016-07-31

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3203970?v=4)[Nima Ghaedsharafi](/maintainers/NimaGhaedsharafi)[@NimaGhaedsharafi](https://github.com/NimaGhaedsharafi)

---

Top Contributors

[![hoomanna](https://avatars.githubusercontent.com/u/5413073?v=4)](https://github.com/hoomanna "hoomanna (43 commits)")[![NimaGhaedsharafi](https://avatars.githubusercontent.com/u/3203970?v=4)](https://github.com/NimaGhaedsharafi "NimaGhaedsharafi (6 commits)")[![amiri27](https://avatars.githubusercontent.com/u/1594140?v=4)](https://github.com/amiri27 "amiri27 (1 commits)")[![majidgolshadi](https://avatars.githubusercontent.com/u/5164297?v=4)](https://github.com/majidgolshadi "majidgolshadi (1 commits)")[![zartosht](https://avatars.githubusercontent.com/u/6488633?v=4)](https://github.com/zartosht "zartosht (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.5k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[chargebee/chargebee-php

ChargeBee API client implementation for PHP

758.5M9](/packages/chargebee-chargebee-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k13](/packages/tempest-framework)[imdhemy/google-play-billing

Google Play Billing

491.5M5](/packages/imdhemy-google-play-billing)

PHPackages © 2026

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