TCH tech support did work on the issue early this morning without success.
We have determined we can talk to the credit card processor's server to fetch a transaction ID, but we are not able to successively transmit the main packet of information via PHP and CURL commands.
CURL appears to be up and running correctly.
Why would part of it work but not the other? Aren't they truly not receiving the data, is it in the wrong format, etc, etc.
Any ideas?
>Works:
$curlHandle = curl_init ();
curl_setopt($curlHandle, CURLOPT_URL,"http://secure.netbilling.com:1401/gw/sas/getid3.0");
curl_setopt($curlHandle, CURLOPT_GET, 1);
curl_setopt($curlHandle, CURLOPT_NOBODY, 0);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
$res = curl_exec($curlHandle);
$curlErrorNo = 0;
$curlErrorMsg = "";
>Doesn't work:
$curlHandle = curl_init ();
curl_setopt($curlHandle, CURLOPT_URL,"https://secure.netbilling.com:1402/gw/sas/direct3.0");
curl_setopt($curlHandle, CURLOPT_POST, 1);
curl_setopt($curlHandle, CURLOPT_HEADER, 1);
curl_setopt($curlHandle, CURLOPT_POSTFIELDS, $post_str);
curl_setopt($curlHandle, CURLOPT_NOBODY, 0);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlHandle, CURLOPT_ENCODING , "x-www-form-urlencoded");
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYPEER, FALSE);
$res = curl_exec($curlHandle);
$resposeHttpCode = (int)curl_getinfo($curlHandle, CURLINFO_HTTP_CODE);
$curlErrorNo = 0;
$curlErrorMsg = "";