cancel
Showing results for 
Search instead for 
Did you mean: 

AIM API method returning errors with no codes

I'm working on the AIM API method.  It makes it to the process_sale page, but returns errors with no codes.  Any idea where I went wrong?

 

www.mathcelebrity.com/checkout_form.php

 

response code 
response reason code 
response reason text

mathceleb1
Contributor
20 REPLIES 20

If you're using a production account, you have to set sandbox to false. If you're using a sandbox account, you have to set it to true.

I read on this thread that I need to change the test URL:

http://groups.google.com/group/activemerchant/browse_thread/thread/c31387593ddc6015?pli=1

 

 

self.test_url = "https://certification.authorize.net/gateway/
transact.dll"
rather than
self.test_url = "https://test.authorize.net/gateway/transact.dll"

 

When I did this, it returns a 405 HTTP error.

 

The response returned is:

AuthorizeNetAIM_Response Object ( [_response_array:private] => Array ( [0] => !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

 

I made sure from the documentation to copy and paste my api login and transaction key into the code directly.

The Authorize.net SDK should point to the correct URL right out of the box. Are you using a recent, unedited version of the SDK? If not, I suggest redownloading it and this time not editing anything. All the config options can be set in your transaction code, as in my example (see back a few posts).

I downloaded the AIM PHP SDK from the bottom of this page:

 

http://developer.authorize.net/downloads/

Well, that should contain the correct URL's by default regardless of whether you're in sandbox mode or not. Unless the test server is having problems or something, I would think it would have to be a problem with your server connecting via SSL. What happens if you try to send a POST request to yourself at an https:// URL?

https://certification.authorize.net used to represent an altenative way of connecting to a production account in test mode, but we retired that URL over 3 years ago and it now just points to our sandbox environment.  The only two currently valid URLs are:

Production: https://secure.authorize.net/gateway/transact.dll

Sandbox: https://test.authorize.net/gateway/transact.dll

 

You should be using secure.authorize.net for a production account, even if that account is in test mode.

 

I was sucessfully able to connect using the production server, and turning off my test account.

 

Last question before I go live:  I purchased an SSL and got my certificate.  however, I need to make a file out of that certificate so the Authorize.net code can find it.  Is it simply a matter of making a text file, pasting in the certificate, and saving it as a .pem file?

 

My host is not answering my question on this.  This might not be the right thread for this, but nobody else can seem to answer my question with my host.

All the hosting I've used has a control panel of some sort for setting up the SSL. Are you saying there's absolutely no control panel for your hosting?

They finally created the file and directory for me.  Thanks for staying with me on this.  Everything worked.

 

Last Question:  When Authorize.net rejects due to a duplicate transation, do they do so based on e-mail address.  We are testing  a few of my credit cards.

Interesting question, but one I don't know the answer to. Going to have to wait for a mod to get on here and post.