33** NAB Transact driver for the Omnipay PHP payment processing library**
44
55[ Omnipay] ( https://github.com/thephpleague/omnipay ) is a framework agnostic, multi-gateway payment
6- processing library for PHP 5.3+ . This package implements NAB Transact support for Omnipay.
6+ processing library for PHP. This package implements NAB Transact support for Omnipay.
77
88[ ![ StyleCI] ( https://styleci.io/repos/74269379/shield?style=flat&branch=master )] ( https://styleci.io/repos/74269379 )
99[ ![ Build Status] ( https://travis-ci.org/sudiptpa/omnipay-nabtransact.svg?branch=master&style=flat-square )] ( https://travis-ci.org/sudiptpa/omnipay-nabtransact )
@@ -13,26 +13,20 @@ processing library for PHP 5.3+. This package implements NAB Transact support fo
1313
1414## Installation
1515
16- Omnipay is installed via [ Composer] ( http://getcomposer.org/ ) . To install, simply add it
17- to your ` composer.json ` file:
16+ Omnipay is installed via [ Composer] ( http://getcomposer.org/ ) . To install, simply require ` league/omnipay ` and ` omnipay/nabtransact ` with Composer:
1817
19- ``` json
20- {
21- "require" : {
22- "sudiptpa/omnipay-nabtransact" : " ~2.0"
23- }
24- }
2518```
26-
27- And run composer to update your dependencies:
28-
29- $ curl -s http://getcomposer.org/installer | php
30- $ php composer.phar update
19+ composer require league/omnipay omnipay/nabtransact
20+ ```
3121
3222## Basic Usage
3323
3424The following gateways are provided by this package:
3525
26+ * NABTransact_DirectPost (NAB Transact Direct Post v2)
27+ * NABTransact_SecureXML (NAB Transact SecurePay XML)
28+ * NABTransact_UnionPay (UnionPay via NAB Transact)
29+
3630### NAB Transact SecureXML API
3731
3832``` php
@@ -43,27 +37,27 @@ The following gateways are provided by this package:
4337 $gateway->setMerchantId('XYZ0010');
4438 $gateway->setTransactionPassword('abcd1234');
4539 $gateway->setTestMode(true);
46-
40+
4741 $card = new CreditCard([
4842 'firstName' => 'Sujip',
49- 'lastName' => 'Thapa',
43+ 'lastName' => 'Thapa',
5044 'number' => '4444333322221111',
5145 'expiryMonth' => '06',
5246 'expiryYear' => '2030',
5347 'cvv' => '123',
5448 ]
5549 );
56-
50+
5751 $transaction = $gateway->purchase([
5852 'amount' => '10.00',
5953 'currency' => 'AUD',
6054 'transactionId' => 'XYZ100',
6155 'card' => $card,
6256 ]
6357 );
64-
58+
6559 $response = $transaction->send();
66-
60+
6761 if ($response->isSuccessful()) {
6862 echo sprintf('Transaction %s was successful!', $response->getTransactionReference());
6963 } else {
0 commit comments