Skip to content

Commit 0fe999c

Browse files
committed
Add insallation instructions.
1 parent 8a41788 commit 0fe999c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Table of Contents
1010

1111
* [Table of Contents](#table-of-contents)
1212
* [Omnipay-AuthorizeNetApi](#omnipay-authorizenetapi)
13+
* [Installation](#installation)
1314
* [Authorize.Net API](#authorizenet-api)
1415
* [API Authorize/Purchase (Credit Card)](#api-authorizepurchase-credit-card)
1516
* [API Capture](#api-capture)
@@ -24,6 +25,10 @@ Table of Contents
2425

2526
Omnipay 3.x implementation of Authorize.Net API
2627

28+
# Installation
29+
30+
composer require "academe/omnipay-authorizenetapi: ~3.0"
31+
2732
# Authorize.Net API
2833

2934
The *Authorize.Net API* driver handles server-to-server requests.
@@ -217,13 +222,19 @@ the previous section. In the `creditCard` object, leave the card details
217222
blank, not set. Instead, send the opaque data:
218223

219224
```php
220-
$gateway->authorize([
225+
$request = $gateway->authorize([
221226
...
222227
'opaqueDataDescriptor' => $opaqueDataDescriptor,
223228
'opaqueDataValue' => $opaqueDataValue,
224229
]);
225230
```
226231

232+
or
233+
234+
```php
235+
$request->setOpaqueData($opaqueDataDescriptor, $opaqueDataValue);
236+
```
237+
227238
The authorizatiob or purchase should then go ahead as though the card
228239
details were provided directly. In the result, the last four digits
229240
of the card will be made available in case a refund needs to be performed.

0 commit comments

Comments
 (0)