PHPackages                             gdpa/pep-gateway - 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. gdpa/pep-gateway

ActiveLibrary[Payment Processing](/categories/payments)

gdpa/pep-gateway
================

PEP IPG code for using in PHP projects.

v1.0(5y ago)27.0kMITPHPPHP &gt;=5.5CI failing

Since Dec 30Pushed 5y ago1 watchersCompare

[ Source](https://github.com/gdpa/pep-gateway)[ Packagist](https://packagist.org/packages/gdpa/pep-gateway)[ RSS](/packages/gdpa-pep-gateway/feed)WikiDiscussions master Synced 1w ago

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

PepGateway
==========

[](#pepgateway)

PepGateway provides Pardakht Electronic Pasargad (*PEP*) internet payment gateway (*IPG*) code for using in PHP projects.
This package is base on PEP company sample code [(pep-phpsample(v3.3.3).rar)](https://pep.co.ir//uploads/pep-phpsample(v3.3.3).rar) that is provided in their website.
For more information you can see their documentation at [pep.co.ir](https://www.pep.co.ir/ipg/).

Usage
-----

[](#usage)

`$ composer require "gdpa/pep-gateway":"dev-master"`

Create pep-certificate.xml in your root directory and provide your private key provided by PEP company in it.

In your classes you can use package this way:

```
use gdpa\PepGateway\PepGateway;
class payment
{
    protected $merchantCode; // Your merchand code
    protected $terminalCode; // Your terminal code
    protected $certificate; // Path to certificate xml

    public function buySomething()
    {
        $gateway = new PepGateway($this->merchantCode, $this->terminalCode, $this->certificate);
        $buyHiddenFields = $gateway->buy($invoiceNumber, $invoiceDate, $amount, $redirectAddress, $timestamp);
        ...
    }

    public function verifyPurchase()
    {
        $gateway = new PepGateway($this->merchantCode, $this->terminalCode, $this->certificate);
        $verify = $gateway->verify($invoiceNumber, $invoiceDate, $amount, $timestamp);
    }

    public function refundTransaction()
    {
        $gateway = new PepGateway($this->merchantCode, $this->terminalCode, $this->certificate);
        $refund = $gateway->refund($invoiceNumber, $invoiceDate, $amount, $timestamp);
    }

    public function check()
    {
        $gateway = new PepGateway($this->merchantCode, $this->terminalCode, $this->certificate);
        $check = $gateway->check($transactionReferenceID, $invoiceNumber, $invoiceDate);
    }
}
```

- `$buyHiddenFields` is contain all necessary fields for using in sending user to gateway:
    - formAction (*Using in form action*)
    - action
    - merchantCode
    - terminalCode
    - invoiceNumber
    - invoiceDate
    - amount
    - redirectAddress (*Your redirect address that you implement settlement codes*)
    - timestamp
- `$verify` values:
    - result (true or false)
    - resultMessage
- `$refund` values:
    - result (true or false)
    - resultMessage
- `$check` values:
    - result (true or false)
    - resultMessage

MPG 'isValid' function also added. (See Their MPG documents.).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

1965d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/66ac3077fbe0bfb59fa2eda91f3fb0333426fe07e3ce60d0e7db521178858942?d=identicon)[gdpa](/maintainers/gdpa)

---

Top Contributors

[![gdpa](https://avatars.githubusercontent.com/u/7866747?v=4)](https://github.com/gdpa "gdpa (21 commits)")

---

Tags

PepGateway

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gdpa-pep-gateway/health.svg)

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

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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