gpt4 book ai didi

python - Paypal 文档令人困惑

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

我正在使用 python 设置网络结帐。

here返回 url 将变量显示为 "PayerID"但是here它显示为 "Payer-ID"

这是什么?

最佳答案

1). 接受 Paypal 付款 https://developer.paypal.com/docs/integration/web/accept-paypal-payment/

When the user approves the payment, PayPal redirects the user to the return_url that was specified

when the payment was created. A payer Id and payment Id are appended to the return URL, as PayerID and paymentId:

http://return_url?paymentId=PAY-6RV70583SB702805EKEYSZ6Y&token=EC-60U79048BN7719609&PayerID=7E7MGXCWTTKK2

2). 使用 Payments API 接受 PayPal https://developer.paypal.com/docs/integration/web/web-checkout/

payment = paypalrestsdk.Payment.find("Payment-ID")
payment.execute({"payer_id": "Payer-ID "})

Note the HATEOAS links in the example response above. Direct the user to the approval_url on the PayPal site, so that the user can approve the payment. PayPal then redirects the user to the return_url that was specified when the payment was created. A payer ID is appended to the return URL, as Payer-ID.

关于python - Paypal 文档令人困惑,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35883632/

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