Uncategorized

PHP/cURL payment gateway handling with GoDaddy hosted site

I’m hoping this might be a useful snip for somebody. I recently had to install/configure a osCommerce application on a GoDaddy hosted web site. I was using Authorize.Net’s AIM (Advanced Integration Method) for handling payments. No matter what I did, I failed connecting to Authorize’s API. After some heavy googlin’, I came across a similar comment.. and they had a fix.

Apparently, GoDaddy uses a HTTPPROXY to handle this. I’m concerned that the proxy is not using SSL, but I’m wondering when it leaves the proxy it gets encrypted.

I’m hoping this might be a useful snip for somebody. I recently had to install/configure a osCommerce application on a GoDaddy hosted web site. I was using Authorize.Net’s AIM (Advanced Integration Method) for handling payments. No matter what I did, I failed connecting to Authorize’s API. After some heavy googlin’, I came across a similar comment.. and they had a fix.

Apparently, GoDaddy uses a HTTPPROXY to handle this. I’m concerned that the proxy is not using SSL, but I’m wondering when it leaves the proxy it gets encrypted.

Anyway, in the following module (authorizenet_aim.php) add the following curl_setopt() values.

curl_setopt ($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE);
curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_setopt ($ch, CURLOPT_PROXY, "http://64.202.165.130:3128");
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

Apparently, x-cart has similar settings for their processing as well. Again, this only applies to GoDaddy hosted sites.