Paypal IPN脚本不起作用

时间:2014-08-10 18:46:04

标签: php paypal paypal-ipn

我遇到PayPal IPN通知脚本问题。我使用了来自https://github.com/paypal/ipn-code-samples的通知示例脚本,并修改了配置设置。我删除了沙箱标志,然后进行了实时测试,因为它在沙箱模式下工作。在实时模式下,它不起作用,并将其保存在日志中:

[2014-08-10 14:23 America/Toronto] HTTP request of validation request:POST /cgi-bin/webscr HTTP/1.1
Host: www.paypal.com
Accept: */*
Connection: Close
Content-Length: 20
Content-Type: application/x-www-form-urlencoded

 for IPN payload: cmd=_notify-validate
[2014-08-10 14:23 America/Toronto] HTTP response of validation request: HTTP/1.1 200 OK
Server: Apache
X-Frame-Options: SAMEORIGIN
Strict-Transport-Security: max-age=14400
Strict-Transport-Security: max-age=14400
Content-Type: text/html; charset=UTF-8
DC: slc-a-origin-www-1.paypal.com
Date: Sun, 10 Aug 2014 18:23:01 GMT
Content-Length: 7
Connection: close
Set-Cookie: stuff; domain=.paypal.com; path=/; Secure; HttpOnly
Set-Cookie: cookie_check=yes; expires=Wed, 07-Aug-2024 18:23:00 GMT; domain=.paypal.com; path=/; Secure; HttpOnly
Set-Cookie: navcmd=_notify-validate; domain=.paypal.com; path=/; Secure; HttpOnly
Set-Cookie: navlns=0.0; expires=Tue, 09-Aug-2016 18:23:00 GMT; domain=.paypal.com; path=/; Secure; HttpOnly
Set-Cookie: Apache=10.73.8.134.1407694980394426; path=/; expires=Tue, 02-Aug-44 18:23:00 GMT
Set-Cookie: X-PP-SILOVER=name%3DLIVE5.WEB.1%26silo_version%3D880%26app%3Dslingshot%26TIME%3D2226710355; domain=.paypal.com; path=/; Secure; HttpOnly
Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT
Set-Cookie: Apache=10.73.8.37.1407694980385303; path=/; expires=Tue, 02-Aug-44 18:23:00 GMT
Set-Cookie: AKDC=slc-a-origin-www-1.paypal.com; expires=Sun, 10-Aug-2014 18:53:01 GMT; path=/; secure

INVALID
[2014-08-10 14:23 America/Toronto] Invalid IPN: cmd=_notify-validate

表格:

<input type="hidden" name="cmd" value="_xclick">
    <input name="currency_code" type="hidden" value="USD">
    <input type="hidden" name="business" value="paypal@****.com">
    <input name="item_name" type="hidden" id="item_name">
    <input name="amount" type="hidden" id="amount">
    <input name="custom" type="hidden" id="custom">
    <input name="type" type="hidden" value='boost'>
    <input name="customer" type="hidden" id="customer" value="<?php echo $_SESSION['username']; ?>">
    <input name="notify_url" type="hidden" value="https://stg.****.com/shop/newshop/notify.php">
    <input type="submit" class="btn btn-primary" value="Buy now">
    </form>

(开头标记位于顶部,<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" target="_new" method="POST">

0 个答案:

没有答案