Thursday, October 5, 2006

ZenCart Godaddy and cURL

by damonp on October 5, 2006

in Ecommerce,Open Source,Snippets

I recently migrated a customer’s ZenCart site to a hosting account with Godaddy.com. The project went smoothly except for the Authorize.net gateway. Trying to process orders, the site timed out on the final order process page.

Godaddy’s support site, some googling and debugging led to this working code to be added to the cURL routine in authorizenet_aim.php.

curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
// The line below was posted on Godaddy's support site,
// but did not work for me
//curl_setopt ($ch, CURLOPT_PROXY,"http://64.202.165.130:3128");
// This line worked for me instead
curl_setopt ($ch, CURLOPT_PROXY,"64.202.165.130:3128");
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt ($ch, CURLOPT_TIMEOUT, 45);

Links:

Popularity: 2%

{ 3 comments }