PHPackages                             akalati/omnipay-benefitgateway - 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. akalati/omnipay-benefitgateway

AbandonedArchivedLibrary[Payment Processing](/categories/payments)

akalati/omnipay-benefitgateway
==============================

Benefit gateway driver for the Omnipay payment processing library

3.0.2(4y ago)11961[1 PRs](https://github.com/akalati/omnipay-benefitgateway/pulls)MITPHPPHP ^7.3|^8.0

Since Jan 21Pushed 4y ago1 watchersCompare

[ Source](https://github.com/akalati/omnipay-benefitgateway)[ Packagist](https://packagist.org/packages/akalati/omnipay-benefitgateway)[ Docs](https://github.com/akalati/omnipay-benefitgateway)[ RSS](/packages/akalati-omnipay-benefitgateway/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (5)Used By (0)

Omnipay: Benefit gateway
========================

[](#omnipay-benefit-gateway)

**Benefit gateway driver for the Omnipay PHP payment processing library**

[Omnipay](https://github.com/thephpleague/omnipay) is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements Benefit gateway support for Omnipay.

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

[](#installation)

Omnipay is installed via [Composer](https://getcomposer.org/). For most uses, you will need to require `league/omnipay` and an individual gateway:

```
composer require league/omnipay:^3 akalati/omanipay-benefitgateway

```

If you want to use your own HTTP Client instead of Guzzle (which is the default for `league/omnipay`), you can require `league/common` and any `php-http/client-implementation` (see [PHP Http](http://docs.php-http.org/en/latest/clients.html))

```
composer require league/common:^3 akalati/omanipay-benefitgateway php-http/buzz-adapter

```

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

[](#basic-usage)

The following methods are provided by this package:

- purchase
- completePurchase

### purchase

[](#purchase)

Use purchase request to construct the redirect link and redirect the customer to benefit gateway payment page

```
$gateway = Omnipay::create('BenefitGateway');

$gateway->setTestMode(true); //call setTestMode(true) to use benefit gateway test endpoint https://www.test.benefit-gateway.bh/payment/PaymentHTTP.htm?param=paymentInit
$gateway->setId(""); //Tranportal ID
$gateway->setPassword(""); // Tranportal Password
$gateway->setResourceKey(""); // Terminal Resourcekey

$response = $gateway->purchase([
	'amount' => 20.5, //Amount in BHD
	'transactionId' => 1, //Order or transaction reference from your system
	'returnUrl' => "https://www.example.com/return", //return url
	'cancelUrl' => "https://www.example.com/error" //error and cancel url
])->send();

$response->redirect();
```

### completePurchase

[](#completepurchase)

use completePurchase in your return callback to handle the request sent by the gateway to your system

```
$gateway = Omnipay::create('BenefitGateway');

$gateway->setResourceKey(""); // Terminal Resourcekey

$response = $gateway->completePurchase()->send();

if ($response->isSuccessful()) {
	$transactionId = $response->getTransactionId(); //transaction id set in the purchase request
	$transactionReference = $response->getTransactionReference(); //transaction reference set by the gateway
	$responseData = $response->getData(); //response received from benefit gateway
	// mark order as complete
} else {
	$response->getMessage();
	// display error message to customer
}
```

For general usage instructions, please see the main [Omnipay](https://github.com/thephpleague/omnipay)repository.

Support
-------

[](#support)

If you are having general issues with Omnipay, we suggest posting on [Stack Overflow](http://stackoverflow.com/). Be sure to add the [omnipay tag](http://stackoverflow.com/questions/tagged/omnipay) so it can be easily found.

If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a [mailing list](https://groups.google.com/forum/#!forum/omnipay) which you can subscribe to.

If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/akalati/omnipay-benefitgateway/issues), or better yet, fork the library and submit a pull request.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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 ~120 days

Total

3

Last Release

1697d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3797475?v=4)[Sayed Sadiq](/maintainers/s-sadiq)[@s-sadiq](https://github.com/s-sadiq)

---

Top Contributors

[![s-sadiq](https://avatars.githubusercontent.com/u/3797475?v=4)](https://github.com/s-sadiq "s-sadiq (5 commits)")

---

Tags

omnipaybenefit gateway

### Embed Badge

![Health badge](/badges/akalati-omnipay-benefitgateway/health.svg)

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

###  Alternatives

[league/omnipay

Omnipay payment processing library

6.1k9.7M166](/packages/league-omnipay)[silverstripe/silverstripe-omnipay

SilverStripe Omnipay Payment Module

38106.0k15](/packages/silverstripe-silverstripe-omnipay)

PHPackages © 2026

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