Also posted in http://www.oscommerce.com/forums/index.php?sho...9381&st=660
Ugh! I had a feeling that the payment gateway was going to be the hardest part of this project and my “Spidey Senses” were right. I have installed the Authorize.net AIM payment module and when I place an order, and click on the submit button at the bottom of the Ceckout Confirmation page, I’m sent back to the checkout_payment.php page with the following error appearing in a red banner across the top of the page.
“Your credit card could not be authorized for this reason. Please correct any information and try again or contact us for further assistance.”
I have reviewed all my settings several times both on Authorize.net and in the payment module in osCommerce. Doesn’t matter how I configure things, the response is always what is shown above.
While I was looking for a solution, I came across discussions relating to Curl. I tried one of the scripts shown in one of the posts. When I test the script using a non-secure url as my target, the script runs successfully. If I swap it out and put in a secure url in the script, I see the following error at the bottom of the page,
“Errors: 60 error setting certificate verify locations”
Here’s the script I was using:
<?php
//Filename: curl_test.php
$ch = curl_init();
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//Disable certificate check.
//curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
//curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
//Enable certificate check
//Download ca-bundle.crt from http://cvs.php.net/cvs.php/curl/lib/ca-bundle.crt
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_CAINFO, "c:/www/catalog/includes/ca-bundle.crt");
//curl_setopt($ch, CURLOPT_URL, "https://www.stanford.edu/group/idg/leland/samples/secure/test.html");
curl_setopt($ch, CURLOPT_URL, "https://www.paypal.com");
$result = curl_exec($ch);
echo '<pre>';
print_r(curl_getinfo($ch));
echo '</pre>';
echo 'Errors: ' . curl_errno($ch) . ' ' . curl_error($ch) . '<br><br>';
curl_close ($ch);
echo $result . 'EOF';
?>
Our hosting company has Curl and OpenSSL configured as follows:
'--with-curl=/home/software/lib/curl-7.10.5-static'
'--with-openssl=/home/software/lib/libssl-0.9.7c/'
Questions:
1. Is Curl the cause of this problem, if not than what could be the cause?
2. Is there some type of debug mode so that I can see additional codes or error messages?
Thanks in advance,
- Mark