I'm developing a shopping cart with both subscription and outright payments on Authorize.Net using PHP. The documentation is not language-specific so I checked the sample codes but none seems to have the answer.

QUESTION: How do we authorize and then capture funds later with Authorize.Net ARB and AIM?

有帮助吗?

解决方案

Perspective A

ARB isn't supposed to be language specific, it is quite the opposite. ARB provides a SOAP or XML interface which allows any language/application that can communicate via SOAP or XML to post and receive responses to/from ARB.

I recommend SOAP over regular old XML; it is more strict and translates very well to OOP. You'll be most interested in PHP's SOAPClient. Use SoapClient to connect to the WSDL as described in Authorize.NET's ARB Guide on page 11: https://api.authorize.net/soap/v1/Service.asmx?WSDL

Perspective B

However, if you would like ready-made APIs in your language of choice (PHP), Authorize.NET has SDKs available for download and use. See http://developer.authorize.net/downloads/#mobile_sdks Notice in the support table that PHP supports Automated Recurring Billing (ARB), Server Integration Method (SIM), and Advanced Integration Method (AIM). On that same downloads page, sample applications are available in your language of choice.

To AUTHORIZE immediately, and CAPTURE later

First, the AIM docs are located at http://developer.authorize.net/guides/AIM/wwhelp/wwhimpl/js/html/wwhelp.htm, and navigate to "Submitting Transactions" > "Credit Card Transaction Types" > "Authorization Only" and "Prior Authorization and Capture"

  1. Perform a x_type=AUTH_ONLY
  2. Then at a later date perform a x_type=PRIOR_AUTH_CAPTURE with a x_trans_id=$ID

Without reinventing the wheel, PHP sample code is available for download (free) at http://developer.authorize.net/resources/files/samplecode/php_aim.zip in regards to AIM.

Authorize.NET's API is well documented and they have plenty of sample code... that is if you know where to look.

Developer Account

Authorze.NET provides a free developer account and sandbox to play with for DPM, SIM and AIM. See http://developer.authorize.net/integration/fifteenminutes/ and sign up at https://developer.authorize.net/testaccount/.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top