Archive for the ‘Programming Notes’ Category

AIM Authorize.Net Integration Hiccup

Saturday, January 30th, 2010

Two hiccups while attempting to configure Authorize.Net AIM method, and how I fixed them:

  • Using Curl, I was submitting by POST with an array.  This caused it to use multipart/form-data encoding, which sure looks like it doesn’t work.  To get it to use www-form-urlencode, I had to urlencode the arguments myself and pass the argument string, not the array.
  • The ampersand (&) is not a field separator — it’s a stop character.  The spec calls for all key/value pairs to end in an ampersand.  If you pull out any old library that will do the previous one — or, let’s say you had one homebrewed… — you might not have put an ampersand on the end.  Without the ampersand, you’ll get that dreaded (92) error.

Do that, and, like magic, it works.