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

ActiveLibrary[Payment Processing](/categories/payments)

netpay/omnipay-netpay
=====================

NetPay Payment Gateway Omnipay plugin

2.0.2(9y ago)2734[1 issues](https://github.com/netpay/omnipay-netpay/issues)MITPHP

Since Apr 19Pushed 9y ago2 watchersCompare

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

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

Omnipay : NetPay
================

[](#omnipay--netpay)

[![Latest Stable Version](https://camo.githubusercontent.com/5f9a0f787f3037a60fcb591c300c3e11a6d60b9bcad763e6c66cb04810182e7c/68747470733a2f2f706f7365722e707567782e6f72672f6e65747061792f6f6d6e697061792d6e65747061792f762f737461626c65)](https://packagist.org/packages/netpay/omnipay-netpay)[![Total Downloads](https://camo.githubusercontent.com/71953033a8bb5cf264c4d655c07e73296ef7aa3d7abb08b6bfcbdce5f6310d20/68747470733a2f2f706f7365722e707567782e6f72672f6e65747061792f6f6d6e697061792d6e65747061792f646f776e6c6f616473)](https://packagist.org/packages/netpay/omnipay-netpay)[![Latest Unstable Version](https://camo.githubusercontent.com/e1a972913dff7ce1a6c8ed895a9c99f0dc01e92af9cd03bc2ff2122eb64dac6a/68747470733a2f2f706f7365722e707567782e6f72672f6e65747061792f6f6d6e697061792d6e65747061792f762f756e737461626c65)](https://packagist.org/packages/netpay/omnipay-netpay)[![License](https://camo.githubusercontent.com/45cf333137217726aa80c881424a73017b08c15db309ad5c822da9d75383b5b9/68747470733a2f2f706f7365722e707567782e6f72672f6e65747061792f6f6d6e697061792d6e65747061792f6c6963656e7365)](https://packagist.org/packages/netpay/omnipay-netpay)

**Gateway Setup**

Basic Gateway Creation Code

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

On gateway you can set the following options:

Allows you to test your code in test environment:

```
$gateway->setTestMode(TRUE);
```

If your endpoint varies from default you can set it using these functions:

```
$gateway->setLiveEndpoint($liveUrl);
$gateway->setTestEndpoint($testUrl);
```

You can set your merchant credentials using functions:

```
$gateway->setMerchantId($merchant_id);
$gateway->setUsername($username);
$gateway->setPassword($password);
```

You can set SSL authentication for connection using functions:

```
$gateway->setCertificatePath($path_to_cert);
$gateway->setCertificateKeyPath($path_to_key);
$gateway->setCertificatePassword($cert_password);
```

**Implemented Gateway Functionalities**

Transactions using card data can be done following way:

```
$response = $gateway->purchase(array('amount' => '10.00', 'currency' => 'GBP', 'card' => $card))->send();
$response = $gateway->authorize(array('amount' => '10.00', 'currency' => 'GBP', 'card' => $card))->send();
```

You can use following function on any of previous requests to get order id of the payment:

```
$orderId = $response->getOrderId();
$response = $gateway->capture(array('amount' => '10.00', 'currency' => 'GBP', 'orderId' => $orderId))->send();
$response = $gateway->refund(array('amount' => '10.00', 'currency' => 'GBP', 'orderId' => $orderId))->send();
```

You can use following function on any of previous requests to get transaction id of the payment:

```
$transactionId = $response->getTransactionId();

$response = $gateway->retrieveTransaction(array('transactionId' => $transactionId, 'orderId' => $orderId))->send();
$response = $gateway->void(array('voidTransactionId' => $transactionId, 'orderId' => $orderId))->send();
```

Transaction id can also be retrieved from capture, refund and void requests.

**For token transactions following can be used:**

When saving card, permanent token expires when card expires and temporary one expires one hour after creation

```
$response = $gateway->createCard(array('card' => $card, 'tokenPermanent' => TRUE))->send();
```

You can retrieve created token from previous request the following way:

```
$token = $response->getToken();
```

Deletion of saved card

```
$response = $gateway->deleteCard(array('token' => $token))->send();
```

Retrieve info about stored card

```
$response = $gateway->retrieveCard(array('token' => $token))->send();
```

Making transactions using saved tokens

```
$response = $gateway->purchase(array('amount' => '10.00', 'currency' => 'GBP', 'token' => $token, 'cvv' => $cvv))->send();
$response = $gateway->authorize(array('amount' => '10.00', 'currency' => 'GBP', 'token' => $token, 'cvv' => $cvv))->send();
```

**Following methods can be used on all requests:**

Returns TRUE on successful transaction and FALSE on error

```
$response->isSuccessful();
```

Returns human readable message if there is one or NULL if not

```
$response->getMessage();
```

Following functions apply to purchase, authorize, capture, refund, void and retrieveTransaction methods, if data is unavailable they return NULL:

Value as generated by the acquirer that summarizes the success or otherwise of the proposed operation.

```
$response->getCode();
```

Value generated by the issuing bank in response to a proposal to transfer funds.

```
$response->getAuthorizationCode();
```

The Reference Retrieval Number (RRN) is a unique number generated by the acquirer for a specific merchant transaction. The RRN can be used to retrieve the transaction data from the acquirer.

```
$response->getReceipt();
```

Unique Order ID of the successful transaction.

```
$response->getOrderId();
```

The amount that has been successfully authorized for this order.

```
$response->getTotalAuthorizedAmount();
```

The amount that has been successfully captured for this order.

```
$response->getTotalCapturedAmount();
```

The amount that has been successfully refunded for this order.

```
$response->getRefundedAmount();
```

Summary of the success or otherwise of the proposed operation. List of codes at [https://developer.netpay.co.uk/api/transaction/v1#collapseThree?retrieve\_transaction\_response](https://developer.netpay.co.uk/api/transaction/v1#collapseThree?retrieve_transaction_response) under response.gateway\_code

```
$response->getGatewayCode();
```

The acquirer CSC response code generated by the card issuing institution

```
$response->getCSCCode();
```

The card security code result generated to indicate whether the data supplied matches the data held by the cardholder's issuing bank. List of codes at [https://developer.netpay.co.uk/api/transaction/v1#collapseThree?retrieve\_transaction\_response](https://developer.netpay.co.uk/api/transaction/v1#collapseThree?retrieve_transaction_response) under response.cardsecurity.gateway\_code

```
$response->getCSCGatewayCode();
```

The acquirer AVS response code generated by the card issuing institution.

```
$response->getAVSCode();
```

The address verification result generated to indicate whether the address data supplied matches the data held by the cardholder's issuing bank. List of codes at [https://developer.netpay.co.uk/api/transaction/v1#collapseThree?retrieve\_transaction\_response](https://developer.netpay.co.uk/api/transaction/v1#collapseThree?retrieve_transaction_response) under response.cardholder\_verification.avs\_gateway\_code

```
$response->getAVSGatewayCode();
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

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

Total

3

Last Release

3601d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a271e9c458cf6fb838ddd3d7a6d052694d70e2d2fa6bccde3f65db44e12a41d?d=identicon)[netpay](/maintainers/netpay)

---

Top Contributors

[![netpay](https://avatars.githubusercontent.com/u/2758743?v=4)](https://github.com/netpay "netpay (15 commits)")

---

Tags

paymentgatewaypaymerchantomnipaypurchasenetpay

### Embed Badge

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

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

###  Alternatives

[lokielse/omnipay-alipay

Alipay gateway for Omnipay payment processing library

587421.0k11](/packages/lokielse-omnipay-alipay)

PHPackages © 2026

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