Showing results for 
Search instead for 
Did you mean: 

Error connecting to AuthorizeNet - CIM



We are having an issue where we can use our sandbox account but not our production account. We have the production account on test mode but we keep seeing "Error Connecting to AuthorizeNet", while the sandbox account works flawlessly. If we turn live mode on our production account it seems to return a response. Why is this? Shouldn't test mode work under our production account? We do have an SSL certificate installed. It does not make sense to me why the sandbox account would work and not our production account. Is there additional code required for production? If I need to post my code let me know...





Are you using the SDKs? the testmode in there is kind of misleading, when it set on, it will use the sandbox server.




Yes we are using the SDKs but we have sandbox set to false along with test is our config code:


// Adjust this to point to the Authorize.Net PHP SDK
require_once 'AuthorizeNet.php';

//$METHOD_TO_USE = "DIRECT_POST";         // Uncomment this line to test DPM

define("AUTHORIZENET_API_LOGIN_ID","");    // Add your API LOGIN ID
define("AUTHORIZENET_TRANSACTION_KEY",""); // Add your API transaction key

define("AUTHORIZENET_SANDBOX",false);       // Set to false to test against production
//define("TEST_REQUEST", "FALSE");           // You may want to set to true if testing against production

// You only need to adjust the two variables below if testing DPM
define("AUTHORIZENET_MD5_SETTING","");                // Add your MD5 Setting.
$site_root = ""; // Add the URL to your site

    die('Enter your merchant credentials in config.php!');

 We have our id and key filled but removed for this post...

Is CIM enabled on the production account?

Is there a response reason code?

CIM is enabled on the account and no there is no error code, everything returns null.

From the source it look like it can't get an AIM response, you might want to debug it to see which CIM Exxxxx error it is getting.

OK, where should I try to start debugging the response from? When I create the transaction?

You would want to see the raw response from the request.

OK, I am doing the following...


$transaction = new AuthorizeNetTransaction;
		$transaction->amount = $finalCostAmount;
		$transaction->customerProfileId = $_SESSION['authnetCustID'];
		$transaction->customerPaymentProfileId = $_SESSION['defaultpaymentID'];	
		$transaction->cardCode = $cvc;
		$request = new AuthorizeNetCIM;
		$response = $request->createCustomerProfileTransaction("AuthCapture", $transaction);
		$transactionResponse = $response->getTransactionResponse();
		echo json_encode($transactionResponse);

 The customerprofileid and paymentid are set and working, I can get that far.

OK I have gotten down to the following error:



The transaction cannot be processed because it is in test mode.



Why is this?