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

ActiveLibrary[Payment Processing](/categories/payments)

armezit/omnipay-nextpay
=======================

NextPay driver for the Omnipay PHP payment processing library

v1.2.0(3y ago)0236MITPHPPHP ^8

Since Apr 14Pushed 3y ago1 watchersCompare

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

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

Omnipay: Nextpay
================

[](#omnipay-nextpay)

**[NextPay](https://nextpay.org) driver for the Omnipay PHP payment processing library**

[![Packagist Version](https://camo.githubusercontent.com/53b7fe88f167dfc6eaac9040f26d6a75150d5dee2cab8015e2a362b785969ca7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61726d657a69742f6f6d6e697061792d6e6578747061792e737667)](https://camo.githubusercontent.com/53b7fe88f167dfc6eaac9040f26d6a75150d5dee2cab8015e2a362b785969ca7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61726d657a69742f6f6d6e697061792d6e6578747061792e737667)[![PHP from Packagist](https://camo.githubusercontent.com/dd05860188514b89233c875962d0e270fce92ae3391869c135ff4e74cf06c73b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f61726d657a69742f6f6d6e697061792d6e6578747061792e737667)](https://camo.githubusercontent.com/dd05860188514b89233c875962d0e270fce92ae3391869c135ff4e74cf06c73b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f61726d657a69742f6f6d6e697061792d6e6578747061792e737667)[![Packagist](https://camo.githubusercontent.com/09aa33f086d24feeecf38a49734edaba6816a89ce5e2f95aa8645f26f028a816/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f61726d657a69742f6f6d6e697061792d6e6578747061792e737667)](https://camo.githubusercontent.com/09aa33f086d24feeecf38a49734edaba6816a89ce5e2f95aa8645f26f028a816/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f61726d657a69742f6f6d6e697061792d6e6578747061792e737667)

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

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

[](#installation)

Omnipay is installed via [Composer](http://getcomposer.org/). To install, simply require `league/omnipay` and `armezit/omnipay-nextpay` with Composer:

```
composer require league/omnipay armezit/omnipay-nextpay

```

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

[](#basic-usage)

The following gateways are provided by this package:

- NextPay

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

Example
-------

[](#example)

### Purchase

[](#purchase)

The result will be a redirect to the gateway or bank.

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('Nextpay');
$gateway->setApiKey('API_KEY');
$gateway->setReturnUrl('https://www.example.com/return');

// Send purchase request
$response = $gateway->purchase([
    'amount' => $amount,
    'currency' => $currency,
    'transactionId' => $orderId, // order_id on merchant side
])->send();

// Process response
if ($response->isSuccessful() && $response->isRedirect()) {
    // store the transaction reference to use in completePurchase()
    $transactionReference = $response->getTransactionReference();
    // Redirect to offsite payment gateway
    $response->redirect();
} else {
    // Payment failed: display message to customer
    echo $response->getMessage();
}
```

### Complete Purchase (Verify)

[](#complete-purchase-verify)

On return, the usual completePurchase will provide the result of the transaction attempt.

The final result includes the following methods to inspect additional details:

```
// Send purchase complete request
$response = $gateway->completePurchase([
    'amount' => $amount,
    'transactionReference' => $transactionReference,
])->send();

if (!$response->isSuccessful() || $response->isCancelled()) {
    // Payment failed: display message to customer
    echo $response->getMessage();
} else {
    // Payment was successful
    print_r($response);
}
```

### Refund Order

[](#refund-order)

Refund an order by the $transactionReference:

```
$response = $gateway->refund([
    'amount' => $amount,
    'transactionReference' => $transactionReference,
])->send();

if ($response->isSuccessful()) {
    // Refund was successful
    print_r($response);
} else {
    // Refund failed
    echo $response->getMessage();
}
```

### Testing

[](#testing)

```
composer test
```

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/armezit/omnipay-nextpay/issues), or better yet, fork the library and submit a pull request.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Total

3

Last Release

1299d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a703c4312d493c2434e8f560bec9706635f7f60c72c0378c9d27eb8dbb5f3e7b?d=identicon)[armezit](/maintainers/armezit)

---

Top Contributors

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

---

Tags

paymentgatewaypaymerchantomnipaynextpay

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[lokielse/omnipay-alipay

Alipay gateway for Omnipay payment processing library

587421.0k11](/packages/lokielse-omnipay-alipay)[sudiptpa/omnipay-nabtransact

National Australia Bank (NAB) Transact driver for the Omnipay payment processing library.

1017.2k](/packages/sudiptpa-omnipay-nabtransact)[lucassmacedo/omnipay-mercadopago

MercadoPago gateway for OmniPay

154.6k](/packages/lucassmacedo-omnipay-mercadopago)

PHPackages © 2026

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