dshmvqnl98119 2014-06-25 21:09
浏览 89

我的主机上没有收到IPN(HTTP响应代码为NULL)

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.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 set_link_state
    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度