PHPackages                             omnipay-psp/omnipay-php-library - 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. [API Development](/categories/api)
4. /
5. omnipay-psp/omnipay-php-library

ActiveLibrary[API Development](/categories/api)

omnipay-psp/omnipay-php-library
===============================

Omnipay PHP Client Library

v1.0.3(4y ago)08MITPHPPHP &gt;=5.3.0

Since Feb 10Pushed 4y ago1 watchersCompare

[ Source](https://github.com/dharmwdp/Omnipay-PHP-Library)[ Packagist](https://packagist.org/packages/omnipay-psp/omnipay-php-library)[ Docs](https://psp.digitalworld.com.sa/)[ RSS](/packages/omnipay-psp-omnipay-php-library/feed)WikiDiscussions main Synced 1mo ago

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

Omnipay-psp-php
===============

[](#omnipay-psp-php)

### Prerequisites

[](#prerequisites)

- A minimum of PHP 5.3 is required

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

[](#installation)

- download the latest release from [the releases section](https://github.com/dharmwdp/omnipay-php/releases). **You should download the `omnipay-php.zip` file**. After that, include `Omnipay.php` in your application and you can use the API as usual.

\##Note: This PHP library follows the following practices:

- Namespaced under `Omnipay\Api`
- API throws exceptions instead of returning errors
- Options are passed as an array instead of multiple arguments wherever possible
- All requests and responses are communicated over JSON

Basic Usage
-----------

[](#basic-usage)

Instantiate the omnipay php instance with `user_name ` , `password` &amp; secret\_key(These will be different for Test and Live). You can obtain the keys from the dashboard app ()

```
use Omnipay\Api\Api;

$secret_key = '89eb5f3beb06a663a81c0c5a392fdb97';
$api_user_name = 'psp_test.paasy3u5.cGFhc3kzdTU2NGViZA==';
$api_password = 'OVNHR3dHaDd5ZnpGN0ExcnByUmdPQVprNzliZUhMbmR3bVJCSUp3alFyUT0=';
$apiMode = 0; // 0=Test, 1=Live
$api = new Api($api_user_name, $api_password, $apiMode);
```

The resources can be accessed via the `$api` object. All the methods invocations follows the following pattern

```
    //$api->class->function() to access the API
    //Example
    //This is for encrypt decrypt before call API
    //Create Payment
    $paymentParm = array('customer' =>array('name'=>'Dharmraj Kumhar', 'email'=>'dharmraj.kumhar@example.com') ,'order'=>array('amount'=>'1', 'currency' => 'SAR'),'sourceOfFunds' => array('provided'=>array('card'=>array('number'=>'5123450000000008','expiry'=>array('month'=>'12','year'=>'2023'), 'cvv'=>'999')), 'cardType' => 'C'), 'remark'=>array('description'=>'This payment is done by card'));
    $api->encryptdecrypt->create($paymentParm, $secret_key, 'encrypt');
    // Payment API
    //Alwase send $param['trandata'] in encrypted string
    $result = $api->payment->createPayment($param);

    //Refund Transaction
    $refundParm = array('transaction' =>array('id'=>'nt8my581z620365207292e','amount'=>'1', 'currency' => 'SAR'), 'remark'=>array('description'=>'Refund transaction'));
    $encripted_result = $api->encryptdecrypt->create($refundParm, $secret_key, 'encrypt');
    $param['trandata'] = $encripted_result['content']['apiResponse'];
    $result = $api->payment->refund($param);

    //Retrive Transaction
    $result = $api->payment->retriveTransaction($transactionId);

    //Transaction List between two date range
    $AllTransParm = array('transaction' =>array('startdate'=>'2022-01-15','enddate'=>'2022-02-09'));
    $result = $api->payment->transactionList($AllTransParm);
```

License
-------

[](#license)

The Omnipay PHP SDK is released under the MIT License. See [LICENSE](LICENSE) file for more details.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

Every ~1 days

Total

4

Last Release

1548d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5311a517a120a44400069aed03dee1741f2d4dcad8f49874471247520c68ee80?d=identicon)[dharmwdp](/maintainers/dharmwdp)

---

Top Contributors

[![dharmwdp](https://avatars.githubusercontent.com/u/98737413?v=4)](https://github.com/dharmwdp "dharmwdp (25 commits)")

---

Tags

omnipayomnipay-psppayment-gatewayphp-libraryphpapiclientomnipay

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/omnipay-psp-omnipay-php-library/health.svg)

```
[![Health](https://phpackages.com/badges/omnipay-psp-omnipay-php-library/health.svg)](https://phpackages.com/packages/omnipay-psp-omnipay-php-library)
```

###  Alternatives

[kunalvarma05/dropbox-php-sdk

Dropbox PHP API V2 SDK (Unofficial)

3633.0M18](/packages/kunalvarma05-dropbox-php-sdk)[mozex/anthropic-php

Anthropic PHP is a supercharged community-maintained PHP API client that allows you to interact with Anthropic API.

46365.1k13](/packages/mozex-anthropic-php)[google-gemini-php/symfony

Symfony Bundle for Gemini

149.4k1](/packages/google-gemini-php-symfony)

PHPackages © 2026

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