I am not able to receive any IPN Notifications on my server, checked IPN History page, i see no HTTP Response code there. A month ago, it was working all fine and then stopped all a sudden. I inquired with hosting guys and they said they have no firewall blocking any of the paypal ip addresses (https://ppmts.custhelp.com/app/answers/detail/a_id/92/kw/IPN/related/1).
I also checked cPanel's Raw Access Log and i cannot find any request made to script "test-ipn.php". If i run this script manually via browser, i see it on Raw Access Log, but when i try with Simulator, it doesn't show up, which seems like Paypal is not posting at all.
However i tried a different url on different host to test with IPN Simulator and it worked there, but not working on the current host.
Any ideas?
Plz advice, thx!
Here's the Screenshot of IPN History page: http://www.247autohits.com/paypal.jpg
UPDATE:
Problem is still there, its keep coming back after restarting apache.
I did some research and found a clue that there is something wrong with HTTP-POST either at the Firewall
end or at the mod_sec
. Because, i used this code to test my host by sending a HTTP POST via PHP cURL and it responded with HTTP CODE 0.
Then i restarted Apache (fixes ipn temporarily) and re-run this code and it returned correct response code 200.
<?php
$ch = curl_init("http://www.xxxxxx.com/");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, array('testing paypal sandbox'));
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Paypal Sandbox Test Localhost'));
$res = curl_exec($ch);
if(!curl_errno($ch)){
$info = curl_getinfo($ch);
echo '<div>Took ' . $info['total_time'] . ' seconds to send a request to ' . $info['url'].'</div>';
}
echo "<div><strong>".strval(curl_getinfo($ch, CURLINFO_HTTP_CODE))."</strong></div>";
?>
I believe HTTP-POST is being restricted by Firewall or mod_sec, not at the initial level but after some time or maybe when something is invoked/alarmed, to possibly prevent from some attack or anything like that.