Home General questions Problem with realtime shipping or payment methods
Problem with realtime shipping or payment methods
Most of realtime shipping services (UPS, FedEx) and payment processors (PayPal, Google Checkout, AuthorizeNet.Aim, LinkPoint API, etc.) require PHP Curl support on your server. If your realtime shipping method does not pass shipping rates from the shipping service server or orders get the Failed status after they are paid using a payment processor, most probably it is caused by the problem with the CURL PHP extension on your server.
- Check whether there is PHP's CURL support installed on your server.
- Real-time shipping services use PHP Curl extension which should be installed on the server properly. To check whether PHP Curl extension is installed on your server:
- Create a php file with the test.php name in the root CS-Cart directory with the following content:
<?php error_reporting(E_ALL); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"https://www.paypal.com"); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_HEADER,1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); $html = curl_exec($ch); echo $html; ?> - Open the http://your_store.com/test.php link where your_store.com is the URL of your CS-Cart. The page should contain the content of PayPal site and there should be some code at the top of the page, for example:
HTTP/1.1 200 OK Date: Thu, 03 Jul 2008 11:24:21 GMT Server: Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7a mod_fastcgi/2.4.6 Cache-Control: private Pragma: no-cache Expires: Thu, 05 Jan 1995 22:00:00 GMT Content-Length: 18648 Set-Cookie: ...
If you see this code and the page contains PayPal site content, Curl is set up properly on your server.
If you see some errors or warnings on the opened page or there is no PayPal site content there please contact your server administrator and ask him about it.
- Create a php file with the test.php name in the root CS-Cart directory with the following content:
- If PHP Curl extension is installed on your server but real-time shipping services do not work most probably the problem is caused by that proxy is used on the server.
- In this case replace the following part of code in the https.php file located in the core directory:
//curl_setopt ($ch, CURLOPT_PROXY, 'myproxy.host.local:3128');
with this one:
curl_setopt ($ch, CURLOPT_PROXY, 'YOUR_PROXY_SERVER:YOUR_PORT');
(where YOUR_PROXY_SERVER:YOUR_PORT is your proxy server and port).If your hosting provider is Godaddy replace the following part of code:
//curl_setopt ($ch, CURLOPT_PROXY, 'myproxy.host.local:3128');
with this one:
curl_setopt ($ch, CURLOPT_PROXY, '64.202.165.130:3128'); - Save the file.
- In this case replace the following part of code in the https.php file located in the core directory:
