1

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?

Jhourlad Estrella
  • 3,545
  • 4
  • 37
  • 66

1 Answers1

0

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/.

zamnuts
  • 9,492
  • 3
  • 39
  • 46
  • So what is then the parameter for authorization and capture? – Jhourlad Estrella Oct 13 '13 at 17:54
  • Thanks. I have actually managed to make the authorization codes running on AIM just a while ago but not yet on ARB. As I have mentioned earlier, there is no reference to it both on the documentation and sample codes. Only AIM has a sample code for AUTH_ONLY transactions. Do I use the same parameter? – Jhourlad Estrella Oct 13 '13 at 18:11
  • @JhourladEstrella perform the AUTH_ONLY via AIM, if successful register with ARB. [Authorize.Net verify credit card AIM and ARB](http://stackoverflow.com/questions/18450602/authorize-net-verify-credit-card-aim-and-arb) is what you're looking for – zamnuts Oct 13 '13 at 18:28