I found the problem. Godaddy says that all CURL traffic (if that is the right word) needs to go through a proxy server.
I downloaded an example from the IG websitte, plugged in the proxy addy and got a response from the server.
This is good news but also bad news, the payment module I linked to earlier wasn't written to support a proxy address. I've tried recoding it but I have absolutely no idea what I am doing and nothing worked obviously.
I am sure this is very simple to a php coder. I've tried contacting the original developer by phone and email with no answer back.
I have a feeling that this code is what needs to be changed but not 100% sure.
// post the data
$cmd = MODULE_PAYMENT_INNOVATIVE_CURL . " -d \"$data\" " . MODULE_PAYMENT_INNOVATIVE_URL;
// echo "curl command<br>" . $cmd . "<br>";
exec($cmd, $return_string);
What would I have to do to support curl through a proxy. Following is the proxy part of the example code that IG gives that I used successfully.
//--< GATEWAY/ISP OPTIONS >------------------
$url = "https://transactions.innovativegateway.com/servlet/com.gateway.aai.Aai";
$user_agent = "Mozilla/4.0";
$proxy = "proxy.shr.secureserver.net:3128"; // If you use a proxy server to connect
// your server to the Internet then put
// in its address here.
// Create the POST form to send to the gateway using
// the incoming array.
$data = "";
foreach ($transaction as $name => $value) {
$data .= "&" . $name . "=" . urlencode($value);
}
$data = substr($data,1);
// Create the connection through the cURL extension
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
if ($proxy != "")
curl_setopt ($ch, CURLOPT_PROXY, $proxy);
curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($ch, CURLOPT_TIMEOUT, 120);
$result = curl_exec ($ch);
curl_close($ch);
If anyone knows how to modify the payment module to use a proxy address like the example code immediately above, I am sure I wouldn't be the only one that could use this.
Anyone's help in this would be greatly appreciated as I am totally lost.