贝宝REST API付款交叉引用交易 [英] PayPal REST API cross reference transaction with payment
问题描述
我已成功地完成使用REST API PHP贝宝付款。不过,我想知道如何跨越与贝宝的Web用户界面引用REST交易。
I have managed to complete a PayPal payment using the REST PHP API. However, I want to know how to cross reference the REST transaction with the PayPal web user interface.
在REST的一边,我有支付ID (的getID())
的交易被批准之前收到。它看起来像PAY-5BH83448XN85470XXXXXXXXXXX
。
On the REST side I have payment id (getID())
received before the transaction is approved. It looks like 'PAY-5BH83448XN85470XXXXXXXXXXX'
.
该交易被批准后,我收回我的重定向URL等三条信息:
After the transaction is approved, I receive back at my redirect URL three other pieces of information:
- success=true
- token=EC-51Y92978Mxxxxxxxx
- PayerID=4Q7YVxxxxxxxx
当我登录到PayPal和审查的支付,没有这些ID匹配与显示的内容。支付细节展示一个独特的事务ID
如#4PP59868EXXXXXXXX
不符合任何东西之上。
When I log into PayPal and review the payment, none of these IDs match up with what is shown. The details for the payment show a Unique Transaction ID
like #4PP59868EXXXXXXXX
that does not match anything above.
我如何交叉引用这些不同的数据块?
How do I cross reference these different pieces of data?
推荐答案
要支付调用的响应将包含交易的列表,其中包含了一组相关的资源。对于已完成的付款会有一个销售项目,销售的id是贝宝交易ID。
The response to the payment call will contain a list of transactions, which contains a set of related resources. For a completed payment there will be a sale item, the id of the sale is the PayPal transaction id.
有关EX(伪):payment.transactions [0] .related_resources [出售] .ID
For ex (pseudo): payment.transactions[0].related_resources[sale].id
在此示例:的https://developer.paypal.com/webapps/developer/docs/integration/direct/accept-credit-cards/
这篇关于贝宝REST API付款交叉引用交易的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!