coatesap / omnipay-realex
Realex driver with 3D Secure & refund support for Omnipay payment processing library
Installs: 18 279
Dependents: 0
Suggesters: 1
Security: 0
Stars: 7
Watchers: 1
Forks: 19
Open Issues: 6
Requires
- omnipay/common: ~2.0
Requires (Dev)
- squizlabs/php_codesniffer: ~1.4.4
README
Realex driver with 3D Secure support for Omnipay payment processing library
Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements Realex (Remote MPI) integration for Omnipay, including optional 3D Secure support.
Installation
The realex driver is installed via Composer. To install, simply add it
to your composer.json
file:
{ "require": { "digitickets/omnipay-realex": "~5.0" } }
And run composer to update your dependencies:
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update
Basic Usage
The following gateways are provided by this package:
- Realex_Remote
For general usage instructions, please see the main Omnipay repository.
3D Secure
The Realex driver has 3D Secure checking turned off by default.
To enable 3D Secure, make sure you have received a 3D Secure account reference from Realex, then set the 3dSecure
parameter as '1' when you initialise the gateway.
Refunds
In order to process a refund, you must configure the gateway with the refundPassword
parameter set to the 'rebate' password that Realex provide you with. In addition, you will need to pass the following parameters, relating to the original transaction: amount
, transactionReference
, transactionId
, currency
, authCode
.
Saved Cards
To save a card, you need to supply the customerRef
and cardReference
parameters. If the customer reference doesn't exist on Realex (you can check this with $response->customerDoesntExist()
), you must create the customer using $gateway->createCustomer()
. Once the customer & card is setup, you can authorise a payment by supplying the card reference & customer reference instead of the card details:
$gateway->purchase( [ 'transactionId' => $transactionId, 'customerRef' => $customerRef, 'amount' => $amount, 'currency' => $currency, 'cardReference' => $cardRef, 'card' => ['cvv' => $cvv] ] );