1
在PayPal的沙箱中完全測試並使該過程完美工作之後。我採取了它生活,它不工作。PayPal IPN監聽器響應
我通過notify_url從PayPal接收POST數據。然後我用cmd = _notify-驗證數據的正面將它發回PayPal。
使用PayPal記錄的代碼,我使用它將消息發送給PayPal。
$header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
$fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30);
(使用此代碼獲得響應)
$res = stream_get_contents($fp, 1024);
響應我得到的回覆是:
HTTP/1.1 200 OK Date: Fri, 11 May 2012 20:51:28 GMT X-Frame-Options: SAMEORIGIN Set-Cookie: cwrClyrK4LoCV1fydGbAxiNL6iG=SdeBuKBN39mjr3w791CHr_MlSkoBdDmbxpQOjT_WOicyD_Sg6BYZm8koiEv2-5XBUkCjpXQwFqIxIQgIyo3e7arO8015CVw96dpne2CNjbgc1CvpDlqXn72IBWq%7cW7uYn6Za7ljG4iLtLVcyFoPk8gZD7sr_S8WjwZrZWD8UXzE7KAH3bll9TVik3wbdCFlrZG%7csxrZZHSH5SWBGfrKsIU6Dz-K43j4h37efIkWFcVJVER0ncRxNJ0wANN1Dp3pZpV2PLxC1m%7c1336769488; domain=.paypal.com; path=/; Secure; HttpOnly Set-Cookie: cookie_check=yes; expires=Mon, 09-May-2022 20:51:28 GMT; domain=.paypal.com; path=/; Secure; HttpOnly Set-Cookie: navcmd=_notify-validate; domain=.paypal.com; path=/; Secure; HttpOnly Set-Cookie: navlns=0.0; expires=Thu, 06-May-2032 20:51:28 GMT; domain=.paypal.com; path=/; Secure; HttpOnly Set-Cookie: Apache=10.73.8.50.1336769488653443; path=/; expires=Sun, 04-May-42 20:51:28 GMT Vary: Accept-Encoding Strict-Transport-Security: max-age=14400 Connection: close Content-Type: text/html; charset=UTF-8 Set-Cookie: TSe9a623=bb3c8ce40a7f3f6d1c018255c9
什麼我沒有收到是無效或驗證迴應在這。這是PayPal的全部輸出。在沙箱中,我在最後一行得到了VERIFIED,並且沒有Set-Cookie。
這似乎很奇怪,我沒有收到INVALID或VERIFIED迴應。
任何建議,將不勝感激。
輝煌!這是問題所在。 –