Posts: 2
Registered: ‎11-18-2011

Trouble with AIM in Live Mode

I am using AIM, and it was working fine in test mode.  When I changed to my live API ID and Password I started getting an error message.  Here is the error message I am getting:


AuthorizeNet Error: Response Code: 3 Response Subcode: 2 Response Reason Code: 13 Response Reason Text: The merchant login ID or password is invalid or the account is inactive


My account is definitely not inactive, and I am using the correcet api login info, because I coppied and pasted it, so I know it is right. support wanted me to make sure that I was posting to


How can I make sure I am posting to that URL?  I have two pages, I have an HTML form that is posted to a page called aim.php.  Here is aim.php:



                                require_once 'includes/anet_php_sdk/AuthorizeNet.php'; // Make sure this path is correct.
                                $transaction = new AuthorizeNetAIM('id', 'pass');

                                $transaction->first_name = $_POST["firstname"];
                                $transaction->last_name = $_POST["lastname"];
                                $transaction->phone = $_POST["phone"];
                                $transaction->address = $_POST["address"];
                                $transaction->city = $_POST["city"];
                                $transaction->state = $_POST["state"];
                                $transaction->zip = $_POST["zip"];
                                $transaction->amount = $_POST["amount"];
                                $transaction->card_num = $_POST["cardnum"];
                                $transaction->exp_date = $_POST["expdate"];
                                $transaction->company = $_POST["employer"] . ' - ' . $_POST["jobdescription"];
                                $transaction->description = $_POST["description"];
                                $transaction->email = $_POST["email"];
                                $transaction->card_code = $_POST["cvv"];

                                $response = $transaction->authorizeAndCapture();

                                if ($response->approved) {
                                  echo "Success! Your credit card has been charged.  You will be receiving an email receipt shortly.<br />";
                                  echo "Transaction ID: " . $response->transaction_id;
                                } else {
                                  echo $response->error_message;


As you can see there is no URL on this page.  Is it a URL somewhere in the SDK that I am supposed to change?

Posts: 4,525
Registered: ‎03-08-2010

Re: Trouble with AIM in Live Mode

define("AUTHORIZENET_SANDBOX", false); 
Posts: 2
Registered: ‎11-18-2011

Re: Trouble with AIM in Live Mode

This did the trick, I think this needs to be better documented.  I couldn't find anywhere that said that by default you are in a sandbox.  I'm sure someone can prove me wrong on this though.