cancel
Showing results for 
Search instead for 
Did you mean: 

Sandbox - Error Connecting to Authorize.net

I am having trouble with connecting to the Sandbox. I recently upgraded to OSX Yosemite from Mavericks. I installed PHP 5.5.14 from BREW. I have CURL installed and working. Here is the PHP code that I am using. Here is the transaction output and response output.

 

$transaction = new AuthorizeNetAIM($anet_api_login_id, $anet_api_trans_key);

$transaction->setSandbox(true);
$transaction->amount = '100.00';
$transaction->card_num = '4007000000027';
$transaction->exp_date = '10/2016';
$transaction->card_code = '900';
$transaction->zip = '46227';

$response = $transaction->authorizeAndCapture();

 

AuthorizeNetAIM Object ( [_x_post_fields:protected] => Array ( [version] => 3.1 [delim_char] => , [delim_data] => TRUE [relay_response] => FALSE [encap_char] => | [amount] => 100.00 [card_num] => 4007000000027 [exp_date] => 10/2016 [card_code] => 900 [zip] => 46227 ) [_additional_line_items:AuthorizeNetAIM:private] => Array ( ) [_custom_fields:AuthorizeNetAIM:private] => Array ( ) [verify_x_fields] => true [_all_aim_fields:AuthorizeNetAIM:private] => Array ( [0] => address [1] => allow_partial_auth [2] => amount [3] => auth_code [4] => authentication_indicator [5] => bank_aba_code [6] => bank_acct_name [7] => bank_acct_num [8] => bank_acct_type [9] => bank_check_number [10] => bank_name [11] => card_code [12] => card_num [13] => cardholder_authentication_value [14] => city [15] => company [16] => country [17] => cust_id [18] => customer_ip [19] => delim_char [20] => delim_data [21] => description [22] => duplicate_window [23] => duty [24] => echeck_type [25] => email [26] => email_customer [27] => encap_char [28] => exp_date [29] => fax [30] => first_name [31] => footer_email_receipt [32] => freight [33] => header_email_receipt [34] => invoice_num [35] => last_name [36] => line_item [37] => login [38] => method [39] => phone [40] => po_num [41] => recurring_billing [42] => relay_response [43] => ship_to_address [44] => ship_to_city [45] => ship_to_company [46] => ship_to_country [47] => ship_to_first_name [48] => ship_to_last_name [49] => ship_to_state [50] => ship_to_zip [51] => split_tender_id [52] => state [53] => tax [54] => tax_exempt [55] => test_request [56] => tran_key [57] => trans_id [58] => type [59] => version [60] => zip ) [_api_login:protected] =>XXXXXX [_transaction_key:protected] => XXXXX [_post_string:protected] => [VERIFY_PEER] => true [_sandbox:protected] => 1 [_log_file:protected] => )

 

AuthorizeNetAIM_Response Object ( [_response_array:AuthorizeNetAIM_Response:private] => Array ( ) [approved] => false [declined] => null [error] => true [held] => null [response_code] => null [response_subcode] => null [response_reason_code] => null [response_reason_text] => null [authorization_code] => null [avs_response] => null [transaction_id] => null [invoice_number] => null [description] => null [amount] => null [method] => null [transaction_type] => null [customer_id] => null [first_name] => null [last_name] => null [company] => null [address] => null [city] => null [state] => null [zip_code] => null [country] => null [phone] => null [fax] => null [email_address] => null [ship_to_first_name] => null [ship_to_last_name] => null [ship_to_company] => null [ship_to_address] => null [ship_to_city] => null [ship_to_state] => null [ship_to_zip_code] => null [ship_to_country] => null [tax] => null [duty] => null [freight] => null [tax_exempt] => null [purchase_order_number] => null [md5_hash] => null [card_code_response] => null [cavv_response] => null [account_number] => null [card_type] => null [split_tender_id] => null [requested_amount] => null [balance_on_card] => null [response] => null [error_message] => Error connecting to AuthorizeNet )

krisbaker78
Member
4 REPLIES 4

If it failed to connect to authorize.net, do you have the php curl log?

RaynorC1emen7
Expert

How would I go about getting that information? I don't know much about curl and the options.

Found the issue, I am getting CURLcode 51, The remote server's SSL certificate or SSH md5 fingerprint was deemed not OK. I changed the $VERIFY_PEER to false and the request works. Not sure what the upgrade to Yosemite did to my SSL. Hopefully I can find a solution for fixing this...

Interestingly, I found this cURL forum thread that mentions error 53s when connecting to Authorize.Net:

http://curl.haxx.se/mail/archive-2001-11/0051.html

 

Note this is from 2001 and recommends setting SSLv3, so please don't take their advice literally. But the general idea may help--declaring your TLS version support and/or ciphers may work.

The POODLE post on the Community blog includes code samples on how to force TLS 1.2 in cURL:

http://community.developer.authorize.net/t5/The-Authorize-Net-Developer-Blog/Important-POODLE-Inform...

 

I'm hoping this helps!

--
"Move fast and break things," out. "Move carefully and fix what you break," in.