Reputation: 14610
I signed up for a test account with Authorize.net because you can't do test transaction with the CIM service except through a test account.
I am using ActiveMerchant::Billing::AuthorizeNetCimGateway, which works fine with my regular account. However using my test account api login info, I get the following error:
"message"=>{"code"=>"E00007", "text"=>"User authentication failed due to invalid authentication values."}
What am I doing wrong? I've read through the active merchant source and have found the following lines which indicate that maybe it is sending to the wrong api url:
self.test_url = 'https://apitest.authorize.net/xml/v1/request.api'
self.live_url = 'https://api.authorize.net/xml/v1/request.api'
As far as I can tell, there is no way to configure which url is used, but I've found this line:
url = test? ? test_url : live_url
which seems to set the var, only the method test? isn't defined anywhere so I can't see how to set it.
I'm confused. Anyone able to connect to their test account via AIM?
Upvotes: 0
Views: 697
Reputation: 14610
Found how to make this work in case anyone cares, or can use this info:
http://groups.google.com/group/activemerchant/browse_thread/thread/173ee6554498b20a/cc91dbe2fda51dd6
ActiveMerchant::Billing::Base.gateway_mode = :test
#detaults to :production
, and will use test server
Upvotes: 1