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回应。
任何建议,将不胜感激。
辉煌!这是问题所在。 –