Paypal IPN POST空

时间:2017-11-17 17:04:09

标签: php json post paypal

我试图将POST请求的内容放在我的服务器上,但没有成功。

数据通过POST发送,Raw:

POST /test-post.php HTTP/1.1
Host: xxxxx.ngrok.io
Accept: */*
Content-Type: application/x-www-form-urlencoded

将此内容放入文件的PHP代码:

file_put_contents('post.json', json_encode($_POST));

它会创建一个post.json文件,但此文件为空。我做错了什么?

完整原始内容:

POST /test-post.php HTTP/1.1

Host: xxx.ngrok.io

Accept: */*

Content-Type: application/x-www-form-urlencoded

User-Agent: PayPal IPN ( https://www.paypal.com/ipn )

correlation-id:b4eb634exxxx

CAL_POOLSTACK:queueserv-http-qtoc:DaemonChild*CalThreadId=0*TopLevelTxnStartTime=15fcae8137e*Host=slcsbsingle3001

CLIENT_PID:17707

Content-Length: 828

X-Forwarded-For: 173.0.xx.xx

payment_cycle=Monthly&txn_type=recurring_payment_profile_created&last_name=Martin&initial_payment_status=Completed&next_payment_date=02%3A00%3A00+Dec+17%2C+2017+PST&residence_country=FR&initial_payment_amount=8.00&currency_code=EUR&time_created=08%3A50%3A40+Nov+17%2C+2017+PST&verify_sign=XXXX&period_type=+Regular&payer_status=verified&test_ipn=1&tax=1.60&payer_email=XXXX%40gmail.com&first_name=Pierre&receiver_email=XXXX%40gmail.com&payer_id=XXXX&product_type=1&initial_payment_txn_id=XXXX&shipping=0.00&amount_per_cycle=8.00&profile_status=Active&charset=windows-1252&notify_version=3.8&amount=8.00&outstanding_balance=0.00&recurring_payment_id=I-XXXX&product_name=Abonnement+Pro&ipn_track_id=XXXX

更新 这是来自Paypal服务器的IPN进程的服务器POST请求

https://developer.paypal.com/docs/classic/express-checkout/ht_ec-recurringPaymentProfile-curl-etc/

问题来自L_BILLINGAGREEMENTDESCRIPTION0变量的初始化,其中我放了特殊字符€,这显然是被禁止的。

禁止但在设置支付授权以获取令牌时,我没有错误消息,当然不会那么容易。当我收到客户详细信息时也没有错误消息。

不,如果您在L_BILLINGAGREEMENTDESCRIPTION0中放置一个禁用字符,那么您将在最终的IPN流程上获得一个空的POST,并且禁止使用€符号!

你必须自己猜测,如果你得到空的POST,那是因为

这太疯狂了,Paypal(有时候经常)是一场真正的噩梦。

0 个答案:

没有答案