Add support for Authorize.net ARB.

More info: http://developer.authorize.net/api/arb

Comments

m.stenta’s picture

Thanks @mattman for taking the first steps!

https://github.com/petrowsky/authnet.module/blob/7.x-1.x-mattman/modules...

Let's continue the discussion here...

mattman’s picture

Just to outline some of the details for any other developers looking for adding ARB support.

The ARB creation method through the Authorize.net API requires the submission of credit card information. This means that integration with the authnet module will require the creation of an ARB at the same time the CIM is created using the same credit card info. This happens at the time of collection.

To my knowledge, this is the only way you can create an ARB. You can't use the details from a CIM profile in order to create a new ARB.

You can create a new ARB from any given transaction within the Authorize.net web browser interface.

This means the ARB module will not only need to create an ARB at the same time that a CIM is created, but it will need to associate the CIM profile to the ARB as part of the process and within the Drupal DB.

The code that I've implemented (as of the time the previous post was made) only integrates the ARB Silent Post feature. This is a feature where each time Authorize.net processes a transaction it will submit, blindly (meaning it does not expect an HTTP response code for the purpose of retransmission) a POST of the details of the transaction. (e.g. Approved, Denied, Expired, etc.)

The code I've added uses the Authorize.net documented method for verification, which uses an MD5Hash in order to verify the POST is coming from Authorize.net.

This POST information, after it has been cleaned and verified is passed onto any other modules via hook_arb_silentpost.

I guess for consistency we should discuss if it should be hook_authnet_arb_silentpost()

It's up to the module receiving the POST data to determine what it needs to do.