PHPackages                             meebio/omnipay-secure-trading - 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. meebio/omnipay-secure-trading

ActiveLibrary[Payment Processing](/categories/payments)

meebio/omnipay-secure-trading
=============================

Secure Trading driver for the Omnipay PHP payment processing library

1.2.0(6y ago)5113.7k↓69.9%11[1 issues](https://github.com/digitickets/omnipay-secure-trading/issues)[1 PRs](https://github.com/digitickets/omnipay-secure-trading/pulls)1MITPHPPHP &gt;=5.3.0

Since Sep 25Pushed 6y ago2 watchersCompare

[ Source](https://github.com/digitickets/omnipay-secure-trading)[ Packagist](https://packagist.org/packages/meebio/omnipay-secure-trading)[ Docs](https://github.com/meebio/omnipay-secure-trading)[ RSS](/packages/meebio-omnipay-secure-trading/feed)WikiDiscussions master Synced yesterday

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

Omnipay: Secure Trading
=======================

[](#omnipay-secure-trading)

**Secure Trading gateway for the Omnipay PHP payment processing library**

[![Latest Version on Packagist](https://camo.githubusercontent.com/1f472fd471871c784d4a1c2fba561562c2d139923c2e21bb0d648e0fd4ce02e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d656562696f2f6f6d6e697061792d7365637572652d74726164696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/meebio/omnipay-secure-trading)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/ef536ef4a279331a1c017d09129830da54cd0eb774abad0fecdee7a07e70a61b/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d656562696f2f6f6d6e697061792d7365637572652d74726164696e672f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/meebio/omnipay-secure-trading)[![Total Downloads](https://camo.githubusercontent.com/341d139133d98807c378c174321be01e7eaca89a26a6d85944b4ea11e4eb14da/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d656562696f2f6f6d6e697061792d7365637572652d74726164696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/meebio/omnipay-secure-trading)

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

Install
-------

[](#install)

Via Composer

```
$ composer require meebio/omnipay-secure-trading
```

Usage
-----

[](#usage)

The following gateways are provided by this package:

- Secure Trading

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

This driver supports following transaction types:

- `purchase($options)` - authorize and immediately capture an amount on the customer's card
- `completePurchase($options)` - handle return from off-site gateways after purchase
- `refund($options)` - refund an already processed transaction
- `threeDSecure($options)` - authorize customer's card through 3D Secure process, same as `purchase($options)`with option `applyThreeDSecure` set to true

Gateway instantiation:

```
$gateway = Omnipay::create('SecureTrading');
$gateway->setSiteReference('siteReference123');
$gateway->setUsername('username123');
$gateway->setPassword('password123');
```

Driver also supports paying with `cardReference` instead of `card`. It can be used in authorize and purchase requests like that:

```
$gateway->purchase([
    'amount'        => '10.00',
    'cardReference' => 'abc',
]);
```

### 3D Secure

[](#3d-secure)

To enable 3D Secure credit card authorization through `purchase` request, `applyThreeDSecure` parameter needs to be set to true. Then whole purchase flow is like below:

```
$gateway = Omnipay::create('SecureTrading');
$gateway->setSiteReference('siteReference123');
$gateway->setUsername('username123');
$gateway->setPassword('password123');

$request = $gatewat->purchase([
    'transactionId'     => 'test-1234',
    'applyThreeDSecure' => true,
    'returnUrl'         => 'http://test-website.test/return-url',
    'amount'            => '2.99',
    'currency'          => 'GBP',
    'card'              => [
        'number'      => '4111111111111111',
        'expiryMonth' => '12',
        'expiryYear'  => '2020',
        'cvv'         => '123',
        'firstName'   => 'Forename',
        'lastName'    => 'Surname',
    ],
]);

$response = $request->send();
if ($response->isSuccessful()) {
    // card not enrolled or unknown enrollment
    // and payment is successful, no redirection needed
} elseif ($response->isRedirect()) {
    // redirect to offsite payment gateway
    $response->redirect();
} else {
    // payment failed: display message to customer
    echo $response->getMessage();
}
```

In case of redirection, following code is needed to process payment after customer returns from remote server:

```
$gateway = Omnipay::create('SecureTrading');
$gateway->setSiteReference('siteReference123');
$gateway->setUsername('username123');
$gateway->setPassword('password123');

$request = $gateway->completePurchase([
    'md'    => $_POST['MD'],
    'paRes' => $_POST['PaRes'],
]);

$response = $request->send();
if ($response->isSuccessful()) {
    // payment is successful
} else {
    // payment failed: display message to customer
    echo $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 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/meebio/omnipay-secure-trading/issues), or better yet, fork the library and submit a pull request.

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [John Jablonski](https://github.com/jan-j)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 78.8% 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 ~706 days

Total

3

Last Release

2521d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4c5887227c3c4089183d5517474453f03cf1e7da65b971bd771128e2af75d7f4?d=identicon)[Jan-J](/maintainers/Jan-J)

![](https://www.gravatar.com/avatar/4c385f24d4f13c86b9c3e54c61b2532189c1ffb3099a8e63738fd75de90b20ba?d=identicon)[RQuadling](/maintainers/RQuadling)

---

Top Contributors

[![jan-j](https://avatars.githubusercontent.com/u/3267115?v=4)](https://github.com/jan-j "jan-j (26 commits)")[![dignat](https://avatars.githubusercontent.com/u/1262138?v=4)](https://github.com/dignat "dignat (4 commits)")[![SeanTaylorVS](https://avatars.githubusercontent.com/u/5079216?v=4)](https://github.com/SeanTaylorVS "SeanTaylorVS (3 commits)")

---

Tags

paymentgatewaypaymerchantomnipaypurchasesecure tradingsecuretrading

### Embed Badge

![Health badge](/badges/meebio-omnipay-secure-trading/health.svg)

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

###  Alternatives

[lokielse/omnipay-alipay

Alipay gateway for Omnipay payment processing library

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

PHPackages © 2026

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