I looked into the problem
This transaction has been declined.
, and supposedly this should only show up in SIM mode, but I was using AIM.
It turns out the A.NET payment gateway code is setting the x_fp_*** related parameters when in AIM mode, but the AIM guide (
http://www.authorize.net/support/AIM_guide.pdf) never even mentions any of the x_fp_*** parameters. I looked in the sample code that A.NET provides (
http://developer.authorize.net/dscode/php_aim.zip) and they also never use the x_fp_*** parameters, so I assume this change is safe.
When i removed these parameters from the AIM transactions, it works every time.