Author: John Conde (Google+)
Just as we did in Integrate the Authorize.Net Payment Gateway with PHP we will need to make sure we have all of the right tools in place before we start to integrate the ARB API into our checkout. The requirements are the same which means if you can work with the Authorize.Net AIM API you can work with their ARB API as well.
Unlike in our previous article we will write this code to be PHP 4 compatible. In places where can take advantage of PHP 5 features we will note that separately. This way users who do not have access to PHP 5 can still take advantage of our code.
Once again we will use the CURL library to facilitate our communications with Authorize.Net. It makes it simple to send and receive data and we like simple.
As always security is important when dealing with sensitive information. Authorize.Net requires all transaction be sent and received securely. If you do not already have OpenSSL installed you can download a copy for free at the OpenSSL website.
As with our implementation of the Authorize.Net AIM API you can use a test account provided by Authorize.Net to test your code. You can get the details from that article.
As with the Advanced Integration Method Authorize.Net provides a comprehensive guide explaining how to use their API. While our article will highlight the important areas in working with this API it only covers a fraction of the functionality. This guide is essential to have if you wish to customize the functionality used in your checkout. You can download a copy of the Automatic Recurring Billing Guide here.
Also like the Advanced Integration Method Authorize.Net provides sample code for their ARB API. Be sure to request a copy as this code is what our code will be based on. Their code is fully functional so it is a great tool to have to make sure you know how to configure your test account properly.