PHPackages                             en1gm4a/fastpay-bundle - 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. en1gm4a/fastpay-bundle

ActiveLibrary[Payment Processing](/categories/payments)

en1gm4a/fastpay-bundle
======================

v1.0.0(2y ago)29MITPHPPHP ^8.0

Since Apr 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/EN1GMA4/FastPay-Bundle)[ Packagist](https://packagist.org/packages/en1gm4a/fastpay-bundle)[ RSS](/packages/en1gm4a-fastpay-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

FastPay Payment Gatway Integration Bundle / PHP
===============================================

[](#fastpay-payment-gatway-integration-bundle--php)

When I started working with the FastPay API for one of my projects, I noticed they didn't have any PHP bundles available. So, I decided to create one myself to make things more organized and easier to integrate. Feel free to use it, and thank me later.

Coded according to the company's original [documentation](https://developer.fast-pay.iq/website-integration)

Features
--------

[](#features)

- Initiate Payment
- Validate Payment
- Refund Payment
- Refund Payment Validation

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

[](#installation)

Use composer

```
composer require en1gm4a/fastpay-bundle

```

Usage
-----

[](#usage)

### Initialize (Required for next steps)

[](#initialize-required-for-next-steps)

```
 $fastpay = new FastPayAPI("your store id","your store password","deploy mode");
```

##### for deploy mode, you can use DEPLOYMODE constant which includes PROD and STAGING

[](#for-deploy-mode-you-can-use-deploymode-constant-which-includes-prod-and-staging)

### Initiating Payment:

[](#initiating-payment)

```
    $InitiatePayment = new InitiatePayment();
    $InitiatePayment->setOrderId("24214565");
    $InitiatePayment->setCart("[{\"name\": \"Scarf\", \"qty\": 1, \"unit_price\": 5000, \"sub_total\": 5000}]");
    $InitiatePayment->setBillAmount("1000");
    $InitiatePayment->setCurrency("IQD");
    $fastpay->ExecuteInitiate($InitiatePayment);
```

##### it returns response type of `InitiatePaymentResponse` class, which includes code, message, data,..etc can be used like this:

[](#it-returns-response-type-of-initiatepaymentresponse-class-which-includes-code-message-dataetc-can-be-used-like-this)

```
$fastpay->ExecuteInitiate($InitiatePayment)->getRedirectUri(); //to get the payment link
$fastpay->ExecuteInitiate($InitiatePayment)->getData(); //response array data
$fastpay->ExecuteInitiate($InitiatePayment)->getCode(); //reponses code (200|422)
$fastpay->ExecuteInitiate($InitiatePayment)->getMessages(); //responses message
```

### Validating Payment:

[](#validating-payment)

```
 $fastpay->ExecuteVPayment("order id");
```

##### it returns response type of `ValidatePaymentResponse` class, which includes code, message, data, and the response data as objects like this:

[](#it-returns-response-type-of-validatepaymentresponse-class-which-includes-code-message-data-and-the-response-data-as-objects-like-this)

```
 $fastpay->ExecuteVPayment("order id")->getMerchantOrderId(); //returns merchant_order_id
```

### Refunding Payment:

[](#refunding-payment)

```
$fastpay->ExecuteRPayment("orderid","amount","refund secret key","msidn (phone num)")
```

##### it returns response type of `RefundPaymentResponse` class, which includes code, message, data, and the response data as objects like this:

[](#it-returns-response-type-of-refundpaymentresponse-class-which-includes-code-message-data-and-the-response-data-as-objects-like-this)

```
 $fastpay->ExecuteRPayment("orderid","amount","refund secret key","msidn (phone num)")->getRecipientName(); //returns reciepient name
```

### Validating Refund:

[](#validating-refund)

```
 $fastpay->ExecuteVRefund("order id");
```

##### it returns response type of `ValidateRefundResponse` class, which includes code, message, data, and the response data as objects like this:

[](#it-returns-response-type-of-validaterefundresponse-class-which-includes-code-message-data-and-the-response-data-as-objects-like-this)

```
$fastpay->ExecuteVRefund("order id")->isRefundStatusTrue; //returns true if refund was successful
```

Disclaimer
----------

[](#disclaimer)

I hereby declare that I am not affiliated with FastPay in any capacity, and I explicitly disclaim any responsibility for its services, products, or actions. This code bundle is provided "as is," without any warranty or guarantee of fitness for any particular purpose. Users are advised to exercise due diligence and discretion when using this code, and I shall not be held liable for any legal issues, damages, or consequences arising from its use.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

744d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6b77ba119cf031b6ecd3edfb7acd9819b00f356898339332ab6e1e751d152b08?d=identicon)[EN1GMA4](/maintainers/EN1GMA4)

---

Top Contributors

[![EN1GMA4](https://avatars.githubusercontent.com/u/38115697?v=4)](https://github.com/EN1GMA4 "EN1GMA4 (2 commits)")

### Embed Badge

![Health badge](/badges/en1gm4a-fastpay-bundle/health.svg)

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

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