1
我有同样的问题,如PayPal Instant Payment Notification Warning。我有两个网站。我有在paypal帐户设置为site1的ipn网址。但是,我正在以当前网站的PayPal表单发送notify_url。我的两个网站上的验证码:Paypal ipn警告
public function paymentCheck()
{
$request = 'cmd=_notify-validate';
foreach ($_POST as $key => $value) {
$value = urlencode(stripslashes($value));
$request .= "&$key=$value";
}
$header = "POST /cgi-bin/webscr HTTP/1.1\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($request) . "\r\n\r\n";
$fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30);
if (!$fp)
return false;
else {
fputs ($fp, $header . $request);
while (!feof($fp)) {
$res = fgets ($fp, 1024);
if (strcmp ($res, "INVALID") == 0) {
return false;
}
}
fclose ($fp);
}
return true;
}
我的网站处理ipn。所有工作正常。但一些贝宝消息失败,他们关闭了。你有什么想法,什么会引起警告?