I am having a odd problem with the php code below. I have noticed the issue is randomly happened in PHP 5.3.6. It works every times when I run it in PHP 5.2.5. Unfortunately we can downgrade the php due to other OCIs issues with 5.2.5, so we have to use 5.3.6. When the issue is occurred, I don't get any response back at all and it happens randomly. Please help, I need to get this project done asap. Thanks.
<?php
$url = 'https://www.PayEverywhere.com/api/vtapi.aspx?profile_id=XXXXXXXX&profile_key=XXXXXXXXXXXXX&transaction_type=S&card_number=...';
$ch = curl_init($url);
curl_setopt($ch,CURLOPT_FRESH_CONNECT,TRUE);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,FALSE);
curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,FALSE);
curl_setopt($ch,CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch,CURLOPT_RETURNTRANSFER, TRUE);
if ( ! $response = curl_exec($ch) )
{
echo "Error " . curl_error($ch). "\n";
}
echo $response;
curl_close ($ch);
?>