cancel
Showing results for 
Search instead for 
Did you mean: 

PHP API - AIM error code 13 - The merchant login ID or password is invalid...

I have been integrating a client's web site with his Authorize.net account. After many hiccups, I finally got everything working properly on the sandbox, including AIM, ARB, and even the callbacks. Only one problem - it's not working when I switch over to his actual merchant account. I get error code 13:

 

--------

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.

--------

 

The account is active and paid up to date, and I copied and pasted the API login ID from the account and verified by printing it out on the page that it's actually being set correctly. Test mode is turned off on the account and sanbox is deactivated in my code. Here it is (PHP):

 

    $authorize = new AuthorizeNetAIM(
        $GLOBALS['_authorize_id'], $GLOBALS['_authorize_key']);
    // $authorize->setSandbox(true);
    // Commented out

    $fields = array(
        'first_name' => $_POST['first'],
        'last_name' => $_POST['last'],
        'company' => $_POST['company'],
        'address' => $_POST['address'],
        'city' => $_POST['city'],
        'state' => $_POST['state'],
        'zip' => $_POST['zip'],
        'country' => 'US',

        'phone' => $_POST['phone'],
        'email' => $_POST['email'],

        'customer_ip' => $_SERVER['REMOTE_ADDR'],

        'description' => "{$_POST['type']} initial fee for " . count($_POST['zips']) . " zip codes with {$population} total estimated population",
        'amount' => $_POST['initial_payment'],

        'card_num' => $_POST['card_number'],
        'exp_date' => sprintf('%02d%02d', $_POST['card_exp_month'], ($_POST['card_exp_year'] % 1000)),
        'card_code' => $_POST['card_ccv']
    );
    $authorize->setFields($fields);    
    $authorize->setCustomField('payment_type', 'SINGLE');

    $result = $authorize->authorizeAndCapture();

 

This was working fine with my test account. The ONLY things I changed were the API login ID (copied from the account), the transaction key (sent me by the client, but if that were incorrect I'd be getting a different error code?), and commenting out the line for sandbox. I can't see what could be going wrong here. Anything obvious that I may have missed?

TJPride
Expert
1 ACCEPTED SOLUTION

Accepted Solutions

This is SO not intuitive, but you have to explicitly set sandbox to false to get it to work:

 

$authorize->setSandbox(false);

No thanks to tech support, which gave me a canned message and obviously didn't even bother to read my detailed ticket. I even asked about this specific situation (whether I had to set sandbox to false) when I called the tech support line, but apparently the person I was talking to didn't know the API either.

View solution in original post

TJPride
Expert
1 REPLY 1

This is SO not intuitive, but you have to explicitly set sandbox to false to get it to work:

 

$authorize->setSandbox(false);

No thanks to tech support, which gave me a canned message and obviously didn't even bother to read my detailed ticket. I even asked about this specific situation (whether I had to set sandbox to false) when I called the tech support line, but apparently the person I was talking to didn't know the API either.

TJPride
Expert