IPN交易全部为INVALID

时间:2014-05-05 16:53:04

标签: paypal paypal-ipn

我们的系统设置使用PayPal IPN(ssl)大约十年。

昨晚,我们所有的交易都以无效方式开始回归。

我们没有改变任何事情。我查找了有关此问题的其他人的帖子,不幸的是,我找不到。

所以我在这里发帖询问其他人是否开始体验这一点,如果没有,那么我们的系统在没有任何改变的情况下从正常到不工作的原因可能是什么?我知道这是一个抽象的问题;在这一点上,这是一个相当抽象的问题。 ; - )

谢谢!

PHP连接的基础......

   $req = 'cmd=_notify-validate';
   for ($var = 0; $var < count ($postvars); $var++) {
   $postvar_key = $postvars[$var];
   $postvar_value = $$postvars[$var];
   $req .= "&" . $postvar_key . "=" . urlencode ($postvar_value);
      }

   // post back to PayPal system to validate
   $header .= "POST /cgi-bin/webscr HTTP/1.1\r\n";
   $header .= "Content-Type: application/x-www-form-urlencoded\r\n";
   $header .= "Host: www.paypal.com\r\n";
   $header .= "Connection: close\r\n";
   $header .= "Content-Length: " . strlen ($req) . "\r\n\r\n";

   $fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30);

3 个答案:

答案 0 :(得分:1)

我在沙箱环境中遇到类似的问题,根本没有收到IPN消息。我在这里查看了定期维护https://www.paypal-notify.com/eventnotification/search?eventSearchType=PayPalSiteStatus

但我找不到与IPN通知相关的内容。

你检查了ipn历史记录显示的内容吗? (https://ppmts.custhelp.com/app/answers/detail/a_id/1046) 在我的情况下,即使通知网址正在工作且可以从外部访问,也没有http响应代码。

即使没有维护,这也不是第一次遇到paypal问题。我建议你打开一张故障单以加快解决率

答案 1 :(得分:0)

检查您的终端是否确定您仍在发送到生产网址(https://www.paypal.com/cgi-bin/webscr?cmd=_notify-validate)而不是测试网址。如果检查结果,您需要进一步调查以确定更改内容以损坏您的消息。

答案 2 :(得分:0)

我也有同样的问题,并且认为您的网络主机(在我的情况下是HostGator)关闭了对$ HTTP_POST_VARS(已弃用)的支持,因此您现在必须使用$ _POST

你还没有说过你在哪里填充$ postvars但是,如果像我一样,你使用的是PayPal的样本IPN脚本,你就是这样得到的:

while (list($key, $value) = each($HTTP_POST_VARS)) {
    $postvars[] = $key;
}

需要更改为$ _POST:

while (list($key, $value) = each($_POST)) {
    $postvars[] = $key;
}

然后我不得不改变

$postvar_value = $$postvars[$var];

$postvar_value = $_POST[$postvar_key];