I'm setting up Payment Data Transfer (PDT) in PayPal.
tx
parameter from the URL. unique PDT token
from the PayPal profile settings page.The documentation says the next step (step 3 in the diagram) is:
Your return URL web page contains an HTML POST form that retrieves the transaction ID and sends the transaction ID and your unique PDT token to PayPal.
That's fine.
But what is the PayPal URL that I POST this data to, to retrieve the transaction details? And what form / parameter names do I use?
I've read multiple pages on the PayPal documentation site but can't find any reference to this PDT URL!?
答案 0 :(得分:1)
当您通过PayPal信息中心启用PDT时,PayPal会向您发送确认电子邮件。在这封电子邮件中,隐藏着文档的链接,似乎是什么!
将一张FORM发布到PayPal,其中包含交易ID和您的身份令牌,这是一个字符串值,用于向PayPal标识您的帐户。表格如下:
<form method=post action="https://www.paypal.com/cgi-bin/webscr">
<input type="hidden" name="cmd" value="_notify-synch">
<input type="hidden" name="tx" value="TransactionID">
<input type="hidden" name="at" value="YourIdentityToken">
<input type="submit" value="PDT">
</form>
在PayPal对您帖子的回复中,第一行是SUCCESS或FAIL。成功的响应如下所示,省略了HTTP标头:
SUCCESS
first_name=Jane+Doe
last_name=Smith
payment_status=Completed
payer_email=janedoesmith%40hotmail.com
payment_gross=3.99
mc_currency=USD
custom=For+the+purchase+of+the+rare+book+Green+Eggs+%26+Ham
...
我最初放弃了这封电子邮件而没有阅读它,这就是为什么我错过了秘密文档!
我还发现this stackexchange question引用了一个更老的PayPal文档页面,它说的是同样的事情:
https://www.paypal.com/us/cgi-bin/webscr?cmd=p/xcl/rec/pdt-techview-outside
但同样,文档页面不可浏览,因此您必须知道确切的URL才能找到它!