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

ActiveLibrary[Payment Processing](/categories/payments)

openplayuk/omnipay-pay360
=========================

Payment Gateway driver for Pay360

01.1k2PHP

Since May 28Pushed 6y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

omnipay-pay360
==============

[](#omnipay-pay360)

**Pay360 driver for the Omnipay PHP payment processing library**

Omnipay implementation of the Pay360 payment gateway.

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

[](#installation)

**Important: Driver requires [PHP's Intl extension](http://php.net/manual/en/book.intl.php) and [PHP's SOAP extension](http://php.net/manual/en/book.soap.php) to be installed.**

The Pay360 Omnipay driver is installed via [Composer](http://getcomposer.org/). To install, simply add it to your `composer.json` file:

```
{
    "require": {
        "openplayuk/omnipay-pay360": "~1.0"
    }
}
```

And run composer to update your dependencies:

```
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update

```

What's Included
---------------

[](#whats-included)

This driver handles transactions being processed by the Simple Interface of Pay360.

What's Not Included
-------------------

[](#whats-not-included)

It does not (currently) handle refunds.

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

[](#basic-usage)

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

### Purchase

[](#purchase)

```
use Omnipay\Omnipay;

// Create the gateway object
$gateway = Omnipay::create('\\OpenPlay\\Pay360\\SimpleInterfaceGateway')->initialize(
    [
        'testMode' => true,
    ]
);

// Create the collection of items that this purchase is for
$itemBag = new \Omnipay\Common\ItemBag(
    [
        new \Omnipay\Common\Item(
            [
                'name' => 'Item A',
                'description' => 'An item for sale',
                'price' => '1.00',
                'quantity' => 1,
            ]
        ),
    ]
);

// Generate a unique ID for your transaction
$transactionId = time();

// These are the parameters needed to make a Pay360 purchase
$config = [
    'subjectId' => '12345678',
    'signatureHmacKeyID' => '123',
    'credentialsIdentifier' => '123456789',
    'routingScpId' => '12345678',
    'routingSiteId' => '1',
    'secretKey' => 'LONG_SECRET_KEY_PROVIDED_BY_THE_GATEWAY==',
    'reference' => 'AA123456789',
    'fundCode' => '1',
    'returnUrl' => 'http://example.com/return.php?transactionId='.$transactionId,
    'cancelUrl' => 'http://example.com/return.php?transactionId='.$transactionId,
];

// Optional - pre-fill cardholder details
$card = new \Omnipay\Common\CreditCard(
    [
        'firstName' => 'Firstname',
        'lastName' => 'Lastname',
        'billingAddress1' => 'Address Line 1',
        'billingCity' => 'City',
        'billingPostcode' => 'P05 C0D',
        'email' => 'tester@example.com',
    ]
);

$purchaseDetails = [
    'transactionId' => $transactionId,
    'description' => 'Test transaction '.$transactionId,
    'amount' => '1.00',
    'currency' => 'GBP',
    'items' => $itemBag,
    'card' => $card, // optional
];

// Send purchase request
$request = $gateway->purchase(array_merge($config, $purchaseDetails));
$response = $request->send();

// Pay360 returns a transaction reference at this stage. You'll need to store
// this (probably in a database) until the customer returns to your site
// so that you can verify the outcome of the transaction.
$transactionRef = $response->getTransactionReference();
```

At this stage `$response->isRedirect()` should be `true` and you can call `$response->redirect()` to send the customer off to the hosted card form page.

You will then need a script to handle the returning customer. The following is a simple example:

```
use Omnipay\Omnipay;

// Create the gateway object
$gateway = Omnipay::create('\\OpenPlay\\Pay360\\SimpleInterfaceGateway')->initialize(
    [
        'testMode' => true,
    ]
);

$transactionId = $_GET['transactionId'];

// Retrieve the transactionRef from your database using $transactionId
$transactionRef = $valueFromDatabase;

$config = [
    'subjectId' => '12345678',
    'signatureHmacKeyID' => '123',
    'credentialsIdentifier' => '123456789',
    'routingScpId' => '12345678',
    'routingSiteId' => '1',
    'secretKey' => 'LONG_SECRET_KEY_PROVIDED_BY_THE_GATEWAY==',
    'reference' => 'AA123456789',
];
$purchaseDetails = [
    'transactionReference' => $transactionRef,
];

// Send complete purchase request
$request = $gateway->completePurchase(array_merge($config, $purchaseDetails));
$response = $request->send();
```

At this stage, you can then check the result of `$response->isSuccessful()` which should return `true` if the transaction succeeded.

If the transaction failed, any errors should be provided in `$response->getMessage()`.

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 believe you have found a bug in this driver, please report it using the [GitHub issue tracker](https://github.com/openplayuk/omnipay-pay360/issues), or better yet, fork the library and submit a pull request.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2751283?v=4)[ianpri](/maintainers/ianpri)[@ianpri](https://github.com/ianpri)

---

Top Contributors

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

### Embed Badge

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

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

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