@@ -110,6 +110,59 @@ The following gateways are provided by this package:
110110
111111```
112112
113+ ### NAB Transact DirectPost v2 UnionPay Online Payment
114+
115+ ``` php
116+ $gateway = Omnipay::create('NABTransact_UnionPay');
117+
118+ $gateway->setMerchantId('XYZ0010');
119+ $gateway->setTransactionPassword('abcd1234');
120+
121+ $gateway->setTestMode(true);
122+
123+ /*
124+ * The parameter transactionId must be alpha-numeric and 8 to 32 characters in length
125+ */
126+
127+ $response = $gateway->purchase(array(
128+ 'amount' => '12.00',
129+ 'transactionId' => '1234566789205067',
130+ 'currency' => 'AUD',
131+ 'returnUrl' => 'http://example.com/payment/response',
132+ ))
133+ ->send();
134+
135+ if ($response->isRedirect()) {
136+ $response->redirect();
137+ }
138+ ```
139+
140+ #### Complete Purchase
141+
142+ ``` php
143+ $gateway = Omnipay::create('NABTransact_UnionPay');
144+
145+ $gateway->setMerchantId('XYZ0010');
146+ $gateway->setTransactionPassword('abcd1234');
147+
148+ $gateway->setTestMode(true);
149+
150+ $response = $gateway->completePurchase(array(
151+ 'amount' => '12.00',
152+ 'transactionId' => '1234566789205067',
153+ 'currency' => 'AUD',
154+ 'returnUrl' => 'http://example.com/payment/response',
155+ ))
156+ ->send();
157+
158+ if ($response->isSuccessful()) {
159+ echo sprintf('Transaction %s was successful!', $response->getTransactionReference());
160+ } else {
161+ echo sprintf('Transaction %s failed: %s', $response->getTransactionReference(), $response->getMessage());
162+ }
163+
164+ ```
165+
113166For general usage instructions, please see the main [ Omnipay] ( https://github.com/thephpleague/omnipay )
114167repository.
115168
0 commit comments