Reply
Member
Posts: 8
Registered: ‎09-29-2014

Error connecting to AuthorizeNet - CIM

Hello,

 

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...

 

Thanks

Joe

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

Re: Error connecting to AuthorizeNet - CIM

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

 

 

Member
Posts: 8
Registered: ‎09-29-2014

Re: Error connecting to AuthorizeNet - CIM

[ Edited ]

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

 

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

$METHOD_TO_USE = "AIM";
//$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 = "http://www.bswstore.com/"; // Add the URL to your site

if (AUTHORIZENET_API_LOGIN_ID == "") {
    die('Enter your merchant credentials in config.php!');
}

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

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

Re: Error connecting to AuthorizeNet - CIM

[ Edited ]

Is CIM enabled on the production account?

Is there a response reason code?

Member
Posts: 8
Registered: ‎09-29-2014

Re: Error connecting to AuthorizeNet - CIM

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

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

Re: Error connecting to AuthorizeNet - CIM

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.

Member
Posts: 8
Registered: ‎09-29-2014

Re: Error connecting to AuthorizeNet - CIM

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

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

Re: Error connecting to AuthorizeNet - CIM

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

Member
Posts: 8
Registered: ‎09-29-2014

Re: Error connecting to AuthorizeNet - CIM

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);
		exit();

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

Member
Posts: 8
Registered: ‎09-29-2014

Re: Error connecting to AuthorizeNet - CIM

[ Edited ]

OK I have gotten down to the following error:

 

E0009

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

 

 

Why is this?