Showing results for 
Search instead for 
Did you mean: 

Error connecting to AuthorizeNet

Hi All,


I'm working on the AIM API method, It's working fine in test server but in live server I got error "Error connecting to


AuthorizeNet". I'm using Test accounts.


Please help me the same.


John Conde :: Certified Authorize.Net Developer (Brainyminds) :: Official Authorize.Net Blogger

NEW! Handling Authorize.Net's Webhooks with PHP

Integrate Every Authorize.Net JSON API with One PHP Class (Sample code included)

Tutorials for integrating Authorize.Net with PHP: AIM, ARB, CIM, Silent Post
All About Authorize.Net's Silent Post

You can't use a test account to the live production server.


and here is the production server url


are you using the SDKs? sample code? you custom code?

ya i'm using test server url


i have changed the url now also i getting same error


production server url

are you using the SDKs? sample code? you custom code? since it is AIM, it there more to just that error message?

i'm using joomla with php, there is one componet(payplans) is available for joomla. In that component they configured lot of payment methods, including We can select the payment method in the joomla backend, our client using so we aselected did not change anything in the code, its working in our local m/c. I'm getting error only in live server even i have put the live account details not test account.


please help me,

This is my coding...


protected function _processNonRecurringRequest(PayplansPayment $payment, $data)
        $transactionData = array(
            'amount' => $payment->getAmount(),
            'card_num' => $data['x_card_num'],
            'exp_date' => $data['x_exp_date'],
            'first_name' => $data['x_first_name'],
            'last_name' => $data['x_last_name'],
            'address' => $data['x_address'],
            'city' => $data['x_city'],
            'state' => $data['x_state'],
            'country' => $data['x_country'],
            'zip' => $data['x_zip'],
            'email' => $data['x_email'],
            'card_code' => $data['x_card_code'],
        'ship_to_first_name' => $data['x_ship_to_first_name'],
        'ship_to_last_name' => $data['x_ship_to_last_name'],
        'ship_to_address' => $data['x_ship_to_address'],
        'ship_to_city' => $data['x_ship_to_city'],
        'ship_to_state' => $data['x_ship_to_state'],
        'ship_to_zip' => $data['x_ship_to_zip'],
        'ship_to_country' => $data['x_ship_to_country']

        $transaction = new AuthorizeNetAIM();
        $transaction->setSandbox($this->getAppParam('sandbox', 0));
        $response = $transaction->authorizeAndCapture();
        $transactionArray = $response->toArray();
        // to identify it sis testing mode or not
        $transactionArray['testmode'] = $this->getAppParam('sandbox', 0);
        // save transaction notification and transaction id
            $payment->set('txn_id', $this->getId().'_'.$transactionArray['transaction_id']);

        $errors   = array();
            $errors['response_reason_code'] = $response->response_reason_code;
            $errors['response_code']        = $response->response_code;
            $errors['response_reason_text'] = $response->response_reason_text;
        return $errors;



in this method $response = $transaction->authorizeAndCapture();  not working...

we need to config any thing in  like return URL?

no. AIM don't use relay response.


Can you search within the code to see where is getting the "Error connecting to"?


Might get a better help with payplans or joomla.