所以我有一個PHP服務,這只是工作是接受PayPal IPN連接。我使用PSR7 $request->getBody()->getContents()
從PayPal IPN模擬器請求獲取以下內容。PayPal IPN模擬器返回「INVALID」,但我遵守規則
payment_type=echeck&payment_date=Tue%20Jun%2007%202016%2012%3A56%3A47%20GMT+0100%20%28BST%29&payment_status=Completed&address_status=confirmed&payer_status=verified&first_name=John&last_name=Smith&[email protected]&payer_id=TESTBUYERID01&address_name=John%20Smith&address_country=United%20States&address_country_code=US&address_zip=95131&address_state=CA&address_city=San%20Jose&address_street=123%20any%20street&[email protected]&[email protected]&[email protected]&residence_country=US&item_name=something&item_number=AK-1234&quantity=1&shipping=3.04&tax=2.02&mc_currency=USD&mc_fee=0.44&mc_gross=12.34&mc_gross_1=12.34&txn_type=web_accept&txn_id=787223012¬ify_version=2.1&custom=xyz123&invoice=abc1234&test_ipn=1&verify_sign=AFcWxV21C7fd0v3bYYYRCpSSRl31AfBnnvbsi0E9urbgYYn51fFWPj23
所以,當我使用後狂飲6 POST
這回使用以下body
荷蘭國際集團以https://www.sandbox.paypal.com/cgi-bin/webscr
。
cmd=_notify-validate&payment_type=echeck&payment_date=Tue%20Jun%2007%202016%2012%3A56%3A47%20GMT+0100%20%28BST%29&payment_status=Completed&address_status=confirmed&payer_status=verified&first_name=John&last_name=Smith&[email protected]&payer_id=TESTBUYERID01&address_name=John%20Smith&address_country=United%20States&address_country_code=US&address_zip=95131&address_state=CA&address_city=San%20Jose&address_street=123%20any%20street&[email protected]&[email protected]&[email protected]&residence_country=US&item_name=something&item_number=AK-1234&quantity=1&shipping=3.04&tax=2.02&mc_currency=USD&mc_fee=0.44&mc_gross=12.34&mc_gross_1=12.34&txn_type=web_accept&txn_id=787223012¬ify_version=2.1&custom=xyz123&invoice=abc1234&test_ipn=1&verify_sign=AFcWxV21C7fd0v3bYYYRCpSSRl31AfBnnvbsi0E9urbgYYn51fFWPj23
我得到INVALID
作爲迴應。我不知道它是否從一個不同的IP地址到服務器處理SSL終止是問題,或者如果我只是發瘋。
我已經跑了PayPal的模擬器要求身體差異的身體我發回沒有cmd
變量並沒有什麼區別。
昨天我有問題,總是發送無效的ipn模擬器。嘗試使用沙箱,對我來說,它正在工作 – jsabina
我剛剛用沙箱嘗試過,而且你的工作是正確的。謝謝! –