Hello,
Starting yesterday we receiving answer from Authorize API with False as a response and NULL as an xml. Obviously that answer don't tell anything helpful so I check API request with simple php snippet like this:
<?php // auth_txn_details_request.php $post_url = 'https://apitest.authorize.net/xml/v1/request.api'; $post_str = '<?xml version="1.0" encoding="utf-8"?><getTransactionDetailsRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><merchantAuthentication><name>NAME</name><transactionKey>KEY</transactionKey></merchantAuthentication><transId>TXN_ID</transId></getTransactionDetailsRequest>'; $curl_request = curl_init($post_url); curl_setopt($curl_request, CURLOPT_POSTFIELDS, $post_str); curl_setopt($curl_request, CURLOPT_HEADER, 0); curl_setopt($curl_request, CURLOPT_TIMEOUT, 45); curl_setopt($curl_request, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl_request, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($curl_request, CURLOPT_CAINFO, './cert.pem'); curl_setopt($curl_request, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml")); $response = curl_exec($curl_request); $curl_error = curl_error($curl_request); print_r($curl_error); curl_close($curl_request); print_r($response);
In response I got the following:
SSL peer has no certificate for the requested DNS name.
Could someone point me out to what might be the cause of such issue? I can tell that it worked a couple of days ago for sure and we didn't make any changes to our servers recently.
11-04-2015 05:43 AM
Hi Eugene,
I'm not familiar with this particular SSL validation error, but it may indicate either that your curl library is outdated or that you are not actually connecting to our server.
Thanks,
Joy
11-06-2015 10:37 AM