@@ -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
2526Omnipay 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
2934The * Authorize.Net API* driver handles server-to-server requests.
@@ -217,13 +222,19 @@ the previous section. In the `creditCard` object, leave the card details
217222blank, 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+
227238The authorizatiob or purchase should then go ahead as though the card
228239details were provided directly. In the result, the last four digits
229240of the card will be made available in case a refund needs to be performed.
0 commit comments