PHPackages                             pec/pec - 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. pec/pec

ActiveLibrary[Payment Processing](/categories/payments)

pec/pec
=======

Pasrian Payment Gateway

v1.0.0(2y ago)012MITPHPPHP ^5.6|^8.0

Since Oct 4Pushed 2y ago1 watchersCompare

[ Source](https://github.com/codeino-co/pec-payment)[ Packagist](https://packagist.org/packages/pec/pec)[ Docs](https://github.com/codeino/pec)[ RSS](/packages/pec-pec/feed)WikiDiscussions main Synced 1mo ago

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

[![](https://camo.githubusercontent.com/48f0c8357940c8e7c5464218c26fdf29743bf244df4ead812bcac52a2038b093/68747470733a2f2f7065632e69722f75706c6f6164732f6173736574732f696d616765732f7065632d6c6f676f2d6e65772e706e67)](https://camo.githubusercontent.com/48f0c8357940c8e7c5464218c26fdf29743bf244df4ead812bcac52a2038b093/68747470733a2f2f7065632e69722f75706c6f6164732f6173736574732f696d616765732f7065632d6c6f676f2d6e65772e706e67)

درگاه پرداخت پارسیان برای لاراول | Laravel Parsian Payment Gateway
==================================================================

[](#درگاه-پرداخت-پارسیان-برای-لاراول--laravel-parsian-payment-gateway)

Pec Library for laravel

کتابخانه درگاه پرداخت پارسیان برای لاراول

روش نصب - Installation
----------------------

[](#روش-نصب---installation)

Use composer to install this package

برای نصب و استفاده از این پکیج می توانید از کمپوسر استفاده کنید

```
composer require pec/pec
```

```
php artisan vendor:publish --provider=Pec\ServiceProvider
```

تنظیمات - Configuration
-----------------------

[](#تنظیمات---configuration)

Add your pin to .env file

شناسه پذیرنده را در فایل .env اضافه کنید

```
PEC_PIN=XXXXXXXXXXXXXX
```

You can also define pin at runtime.

امکان تعیین کد پذیرنده در حین اجرا نیز وجود دارد که در ادامه توضیح داده خواهد شد.

روش استفاده | How to use
------------------------

[](#روش-استفاده--how-to-use)

### ارسال مشتری به درگاه پرداخت | Send customer to payment gateway

[](#ارسال-مشتری-به-درگاه-پرداخت--send-customer-to-payment-gateway)

```
$response = pec_gateway()
    ->pin('XXXXXXXXXXXXXXX') // تعیین کد پذیرنده در حین اجرا - اختیاری
    ->amount(100) // مبلغ تراکنش
    ->request()
    ->callbackUrl('https://domain.com/verification') // آدرس برگشت پس از پرداخت
    ->mobile('09123456789') // شماره موبایل مشتری - اختیاری
    ->send();

if (!$response->success()) {
    return $response->error()->message();
}

// ذخیره اطلاعات در دیتابیس
// $response->authority();

// هدایت مشتری به درگاه پرداخت
return $response->redirect();
```

### بررسی وضعیت تراکنش | Verify payment status

[](#بررسی-وضعیت-تراکنش--verify-payment-status)

```
$authority = request()->query('Authority');
$status = request()->query('Status');

$response = pec_gateway()
    ->pin('XXXXXXXXXXXXXXX') // تعیین کد پذیرنده در حین اجرا - اختیاری
    ->amount(100)
    ->verification()
    ->authority($authority)
    ->send();

if (!$response->success()) {
    return $response->error()->message();
}

// دریافت هش شماره کارتی که مشتری برای پرداخت استفاده کرده است
// $response->cardHash();

// دریافت شماره کارتی که مشتری برای پرداخت استفاده کرده است (بصورت ماسک شده)
// $response->cardPan();

// پرداخت موفقیت آمیز بود
// دریافت شماره پیگیری تراکنش و انجام امور مربوط به دیتابیس
return $response->referenceId();
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

955d ago

### Community

Maintainers

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

---

Top Contributors

[![ehsan-developer](https://avatars.githubusercontent.com/u/90515397?v=4)](https://github.com/ehsan-developer "ehsan-developer (13 commits)")

---

Tags

laravelpaymentpayment gatewayparsianparsian paymentparsian gateway

### Embed Badge

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

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

###  Alternatives

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