gpt4 book ai didi

PHP Paypal "official"IPN 监听器无法正常工作

转载 作者:太空宇宙 更新时间:2023-11-03 16:24:58 27 4
gpt4 key购买 nike

我是 Paypal 的新手,我正在尝试使用 IPN 来了解交易何时完成。我读过 Paypal documentation for IPN , 它提供了一些 IPN listener code samples .我将 PHP 示例版本(没有任何更改)上传到我的服务器,并使用 IPN 模拟器为 IPN 监听器生成伪造的 IPN 消息。我原以为 IPN 监听器会成功处理 IPN 消息,而 IPN 模拟器确实返回了以下消息:“IPN 已发送且握手已验证”。

但是,IPN 监听器生成的日志文件表明监听器未能正确处理 IPN 消息。这是日志文件的内容:

[2016-03-29 17:48 UTC] HTTP request of validation request:POST /cgi-

bin/webscr HTTP/1.1
Host: www.sandbox.paypal.com
Accept: */*
Connection: Close
Content-Length: 941
Content-Type: application/x-www-form-urlencoded

for IPN payload: cmd=_notify-validate&payment_type=instant&payment_date=Tue+Mar+29+2016+18%3A16%3A38+GMT%2B0100+%28Hora+de+Ver%C3%83%C2%A3o+de+GMT%29&payment_status=Completed&address_status=confirmed&payer_status=verified&first_name=John&last_name=Smith&payer_email=buyer%40paypalsandbox.com&payer_id=TESTBUYERID01&address_name=John+Smith&address_country=United+States&address_country_code=US&address_zip=95131&address_state=CA&address_city=San+Jose&address_street=123+any+street&business=seller%40paypalsandbox.com&receiver_email=seller%40paypalsandbox.com&receiver_id=seller%40paypalsandbox.com&residence_country=US&item_name1=something&item_number1=AK-1234&tax=2.02&mc_currency=USD&mc_fee=0.44&mc_gross=12.34&mc_gross_1=12.34&mc_handling=2.06&mc_handling1=1.67&mc_shipping=3.02&mc_shipping1=1.02&txn_type=cart&txn_id=302758056&notify_version=2.1&custom=xyz123&invoice=abc1234&test_ipn=1&verify_sign=AFcWxV21C7fd0v3bYYYRCpSSRl31AHYNfmsVFESKyDLknmS3M5A8PkNI
[2016-03-29 17:48 UTC] HTTP response of validation request: HTTP/1.1 200 OK
Date: Tue, 29 Mar 2016 17:48:00 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
Set-Cookie: c9MWDuvPtT9GIMyPc3jwol1VSlO=2I3qnyCkBB3XdWjX_k6qUfsHuBc1GAbvT7Mvx82vTNttPkSuPqzY2-m8MQq8SaoGHm7SWL4gG3vnyU48YFmYwci1hBFCrewHMEzxJHb6vwOdE3JHuDBlWlPpPKljHvs0XDhyhrpxKRdBKHJbfB8S2r6dpS12MhsnjD20c3TuoB50fahlPAwe-DB_fzV4doj7pFdqyGkujspMt-GVcu4Oag-DHwSpiyUPPDwUFlDP0Mel2BZtpkS9RMOp67FTwauchCGQ43Q1eGBCB5mCsokggySU-xhqk1BVQVT_0_vzmiZuGtQD17fQpVRE396JsQynQO3OKfAsq5hhcKHmRMYbmgY-XLZcGqqRKFsYPFCPMb4oTm79-BbDtOzhMw0VrG70wmInHRwhUEaGWTHoE3Cr1bHJGHuH3T6fJPXme6ygPzugAlmMZIFNsiKNYjy; domain=.paypal.com; path=/; Secure; HttpOnly
Set-Cookie: cookie_check=yes; expires=Fri, 27-Mar-2026 17:48: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=Thu, 29-Mar-2018 17:48:00 GMT; domain=.paypal.com; path=/; Secure; HttpOnly
Set-Cookie: Apache=10.72.108.11.1459273680419868; path=/; expires=Thu, 22-Mar-46 17:48:00 GMT
Vary: Accept-Encoding,User-Agent
Connection: close
HTTP_X_PP_AZ_LOCATOR: sandbox.slc
Paypal-Debug-Id: 513d36fd62f6b
Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.WEB.1%26silo_version%3D1880%26app%3Dappdispatcher%26TIME%3D3502242390; domain=.paypal.com; path=/; Secure; HttpOnly
Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT
Strict-Transport-Security: max-age=14400
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

INVALID
[2016-03-29 17:48 UTC] Invalid IPN: cmd=_notify-validate&payment_type=instant&payment_date=Tue+Mar+29+2016+18%3A16%3A38+GMT%2B0100+%28Hora+de+Ver%C3%83%C2%A3o+de+GMT%29&payment_status=Completed&address_status=confirmed&payer_status=verified&first_name=John&last_name=Smith&payer_email=buyer%40paypalsandbox.com&payer_id=TESTBUYERID01&address_name=John+Smith&address_country=United+States&address_country_code=US&address_zip=95131&address_state=CA&address_city=San+Jose&address_street=123+any+street&business=seller%40paypalsandbox.com&receiver_email=seller%40paypalsandbox.com&receiver_id=seller%40paypalsandbox.com&residence_country=US&item_name1=something&item_number1=AK-1234&tax=2.02&mc_currency=USD&mc_fee=0.44&mc_gross=12.34&mc_gross_1=12.34&mc_handling=2.06&mc_handling1=1.67&mc_shipping=3.02&mc_shipping1=1.02&txn_type=cart&txn_id=302758056&notify_version=2.1&custom=xyz123&invoice=abc1234&test_ipn=1&verify_sign=AFcWxV21C7fd0v3bYYYRCpSSRl31AHYNfmsVFESKyDLknmS3M5A8PkNI

为什么 IPN 监听器无法正常工作?有关信息,由于我仍处于开发模式,我的网站上仍然没有 SSL 证书,但是 apparently SSL certificates are not needed to test the IPN listener .

最佳答案

您发送给 PayPal 进行验证的以下字符串似乎是一些虚拟数据。能否请您进行真实的沙盒支付测试并将真实的 IPN 数据发回 PayPal 以再次检查验证结果?

cmd=_notify-validate&payment_type=instant&payment_date=Tue+Mar+29+2016+18%3A16%3A38+GMT%2B0100+%28Hora+de+Ver%C3%83%C2%A3o+de+GMT%29&payment_status=Completed&address_status =已确认&payer_status=已验证&first_name=John&last_name=Smith&payer_email=buyer%40paypalsandbox.com&payer_id=TESTBUYERID01&address_name=John+Smith&address_country=United+States&address_country_code=US&address_zip=95131&address_state=CA&address_city=San+ Jose&address_street=123+any+street&business=seller%40paypalsandbox.com&receiver_email=seller%40paypalsandbox .com&receiver_id=seller%40paypalsandbox.com&residence_country=US&item_name1=something&item_number1=AK-1234&tax=2.02&mc_currency=USD&mc_fee=0.44&mc_gross=12.34&mc_gross_1=12.34&mc_handling=2.06&mc _handling1=1.67&mc_shipping=3.02&mc_shipping1=1.02&txn_type=cart&txn_id=302758056&notify_version=2.1&custom= xyz123&invoice=abc1234&test_ipn=1&verify_sign=AFcWxV21C7fd0v3bYYYRCpSSRl31AHYNfmsVFESKiDLknmS3M5A8PkNI

关于PHP Paypal "official"IPN 监听器无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36291919/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com