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

ActiveLibrary[Payment Processing](/categories/payments)

omnipay/metacharge
==================

Metacharge Paypoint.net Freedom Gateway +IMA (with 3d secure) gateway for Omnipay payment processing library

v2.3.1(11y ago)054MITPHP

Since Jun 18Pushed 11y agoCompare

[ Source](https://github.com/tomsowerby/omnipay-metacharge)[ Packagist](https://packagist.org/packages/omnipay/metacharge)[ Docs](https://github.com/tomsowerby/omnipay-metacharge)[ RSS](/packages/omnipay-metacharge/feed)WikiDiscussions master Synced 2d ago

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

Omnipay: Metacharge
===================

[](#omnipay-metacharge)

**Metacharge (by Paypoint.net) driver for the Omnipay PHP payment processing library**

[![Build Status](https://camo.githubusercontent.com/ac058450891a7ca963d65529fbfceff304a3a73f549ca7fd0bf0a6a33caa5152/68747470733a2f2f7472617669732d63692e6f72672f746f6d736f77657262792f6f6d6e697061792d6d6574616368617267652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/tomsowerby/omnipay-metacharge)[![Coverage Status](https://camo.githubusercontent.com/bc727d7102422044f2b8177c9b08bf07b7c53d96241ac7dbdf8f39643a03809d/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f746f6d736f77657262792f6f6d6e697061792d6d6574616368617267652f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/tomsowerby/omnipay-metacharge?branch=master)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/319aa58a087b73b1db9746c4faf9669408280c2534ceea2cb617a69eb19e6dbd/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746f6d736f77657262792f6f6d6e697061792d6d6574616368617267652f6261646765732f7175616c6974792d73636f72652e706e673f733d34356635623733633336383536346561343436373066313335333538326535323933373036356331)](https://scrutinizer-ci.com/g/tomsowerby/omnipay-metacharge/)[![Dependency Status](https://camo.githubusercontent.com/12c60ada94f4e7d496d03d26ba75b09f1702d27293c6fde2c91f6b14f36d433f/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3533343766636634666530643037333961633030303239642f62616467652e706e67)](https://www.versioneye.com/user/projects/5347fcf4fe0d0739ac00029d)

[![Latest Stable Version](https://camo.githubusercontent.com/aad03c27e30f83a062d057f2153625467f19e6d0fc1768311eed4b5165b7dbcb/68747470733a2f2f706f7365722e707567782e6f72672f6f6d6e697061792f6d6574616368617267652f76657273696f6e2e706e67)](https://packagist.org/packages/omnipay/metacharge)[![Total Downloads](https://camo.githubusercontent.com/61fd0914055e4d27640dc86dbcf5bba0028412fa7464e57a49938ce30c0ee055/68747470733a2f2f706f7365722e707567782e6f72672f6f6d6e697061792f6d6574616368617267652f642f746f74616c2e706e67)](https://packagist.org/packages/omnipay/metacharge)[![Latest Unstable Version](https://camo.githubusercontent.com/045c2e63ccabcb75c0291a1112ffdc3ca9a7a87bed96f0cab9665141e38a10e9/68747470733a2f2f706f7365722e707567782e6f72672f6f6d6e697061792f6d6574616368617267652f762f756e737461626c652e706e67)](https://packagist.org/packages/omnipay/metacharge)[![License](https://camo.githubusercontent.com/2f99ef14ad6e6ba4ff6ad4de5dca8ad9dc8cdcd6bfe17374d6cb097ccc260d08/68747470733a2f2f706f7365722e707567782e6f72672f6f6d6e697061792f6d6574616368617267652f6c6963656e73652e706e67)](https://packagist.org/packages/omnipay/metacharge)

[Omnipay](https://github.com/omnipay/omnipay) is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements Paypoint.net Metacharge Gateway Freedom +IMA support for Omnipay.

Based on Paypoint.net Gateway +IMA [Integration Guides](http://www.paypoint.net/support/integration-guides/):

- [Gateway Freedom +IMA Integration Guide 2.3](http://www.paypoint.net/assets/guides/MCPE_Freedom+IMA_2.3.pdf)
- [Gateway Freedom +IMA 3D Secure Guide 3.1](http://www.paypoint.net/assets/guides/MCPE_Freedom+IMA_3DSecure_3.1.pdf)

This has been created based on the documentation, and has not been fully tested yet. Changes will be made as it is tested so keep an eye on revisions.

If you are looking for the Paypoint Secpay Freedom product, a library seems to be in development by JustinBusschau [here](https://github.com/JustinBusschau/omnipay-secpay).

*NOTE*An active account is required for 3D secure integration (not mentioned in 3D Secure documentation - at present version 3.1). Also, 3D secure needs to be activated on the account by Secpay staff. An account in test mode, or without 3D secure activated, always returns results as though the card is not enrolled.

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

[](#installation)

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

```
{
    "require": {
        "omnipay/metacharge": "~2.0"
    }
}
```

And run composer to update your dependencies:

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

```

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

[](#basic-usage)

The following gateways are provided by this package:

- Metacharge (Paypoint.net Metacharge Checkout) with 3DSecure (API v1.4)

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

### Standard payment with 3D secure

[](#standard-payment-with-3d-secure)

```
/**
 * On your submission page
 */

$gateway = \Omnipay\Omnipay::create('Metacharge'); /* @var $gateway \Omnipay\Metacharge\Gateway */
$gateway->setTestMode(1);
$gateway->setInstId(123456); //Edit to your install id
$gateway->set3DSecureResponseUrl('http://www.yoursite.com/response'); //Set to your 3d secure response capture endpoint

$formInputData = array(
    'firstName' => 'Joe',
    'lastName' => 'Bloggs',
    'email' => 'test@paypoint.net',
    'postcode' => 'BA12BU',
    'number' => '1234123412341234', // This number MUST be used for 3D secure testing (based on conversation with Secpay technical team).
    'expiryMonth' => '06',
    'expiryYear' => '14',
    'cvv' => '707',
);
$card = new \Omnipay\Common\CreditCard($formInputData);

$requestParams = array(
    'amount' => 10.00,
    'currency' => 'GBP',
    'card' => $card,
    'cartID' => '654321',
    'description' => 'description of goods',
);

$request = $gateway->purchase($requestParams); /* @var $request \Omnipay\Metacharge\Message\PaymentRequest */

$response = $request->send(); /* @var $response \Omnipay\Metacharge\Message\PaymentResponse */

// Is it an immediate success, with no 3D secure?
var_dump($response->isSuccessful()); // bool
var_dump($response->getData()); // array
// Process the payment here.

// Is it a 3d secure redirect?
if($response->isRedirect()) {
    //Save bits for later.
    $transactionId = $response->getTransactionId();
    $secureToken = $response->getSecurityToken();
    $s3DTransId = $response->getS3DTransID();
    $s3DMerchantData = $response->getS3DMerchantData();
    //Save these

    //Send user off to the 3D secure page
    $response->redirect();
}

/**
 * On your 3d secure response capture page, set by $gateway->set3DSecureResponseUrl
 */

// A lot of these are the values that we saved above
$s3dParams = array(
    'transactionId' => $transactionId,
    'securityToken' => $secureToken,
    's3DTransID' => $s3DTransId,
    's3DResponse' => $_POST['PaRes'],
    's3DMerchantData' => $s3DMerchantData, //Or $_POST['MD'] should be the same
);

// Any validation of the session that you might need to do here.

// Resume the request
$request = $gateway->s3DAuthorisationResume($s3dParams); /* @var $request \Omnipay\Metacharge\Message\S3DAuthorisationResumeRequest */

$response = $request->send(); /* @var $response \Omnipay\Metacharge\Message\PaymentResponse */

// Is it a success, after 3D secure? Note, this response is the same as an initially successful payment.
var_dump($response->isSuccessful()); // bool
var_dump($response->getData()); // array

```

Todo
----

[](#todo)

- Pass through parameters. Supported by Metacharge using prefix "PT\_"
- Unit tests cover everything, but could be more extensive. Please report bugs and ideally provide a failing 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 announcements, 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/tomsowerby/omnipay-metacharge/issues), or better yet, fork the library and submit a pull request.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity64

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

Total

2

Last Release

4262d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

paymentgatewaypaymerchantomnipaypurchase3d-securefreedompaypointimametacharge

### Embed Badge

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

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

PHPackages © 2026

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