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。所有工作正常。但一些貝寶消息失敗,他們關閉了。你有什麼想法,什麼會引起警告?