Paypal REST-获取付款详细信息仅适用于“尚未完成"的付款吗? [英] Paypal REST - get payment details only works for payments that have "yet to complete"?

查看:107
本文介绍了Paypal REST-获取付款详细信息仅适用于“尚未完成"的付款吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算使用此端点使用销售的付款ID来检查并查看销售是否已完成:/v1/payments/payment/{payment_id}(

I was planning to use this endpoint to check and see if a sale has completed, using the sale's payment id: /v1/payments/payment/{payment_id} (https://developer.paypal.com/docs/api/payments/#payment_get)

但是我只是在此端点的描述中注意到了这句话:

But I just noticed this sentence in the description of this endpoint:

按ID显示尚未完成的付款(按ID)的详细信息.

我花了几天的时间阅读文档,但不知道加粗部分的含义.我希望能够使用付款ID和此端点来检查用户完成购买后的销售天数,月数甚至是几年的状态,但是这句话的粗体部分似乎告诉我,我不会能够做到这一点.

I've spent days reading the docs and I don't know what the bolded part means. I would like to be able to use the payment id and this endpoint to check the status of a sale days, months, even years after the user has completed their purchase, but the bolded part of this sentence seems to tell me I won't be able to do that.

这是否意味着在销售状态=完成后,我不能再使用此端点获取付款/销售详细信息?付款是否会从Paypal的系统中删除,只剩下销售?

Does this mean that after the sale has status = completed I can no longer use this endpoint to get the payment/sale details? Does the payment get deleted from paypal's system, and only the sale remains?

谢谢!

推荐答案

我并不是要说明为什么措辞是需要更新的方式,但实际上是在下面.

I am not trying to justify why the wording is the way it is which needs to be updated but below is really what's happening.

在您进行POST/v1/payments/时,它会创建通常由ID PAY-xxxx标识的付款资源

When you do POST /v1/payments/ it creates a payment resource typically identified by an id PAY-xxxx

这通常有3种状态 已创建.事务已成功创建. 批准.付款人批准了交易. 失败.交易请求失败.

this typically goes in 3 statuses created. The transaction was successfully created. approved. The payer approved the transaction. failed. The transaction request failed.

当您执行POST/v1/payments/PAY-XXXX/execute(假设您进行了intent = sale)时,这会导致创建一个名为"sale"的新资源,当您检查该资源时,该资源可以在related_resources中看到响应.

when you do a POST /v1/payments/PAY-XXXX/execute (presuming you did an intent=sale) this results in the creation of a new resource called "sale" which can be seen in the related_resources when you examine the response.

这是否意味着在销售状态=完成后,我不能再使用此端点获取付款/销售详细信息? 即使销售状态已完成,您也可以注意到,付款状态仍为已批准"(销售是付款中的related_resource).因此,您始终可以查找PAY-xxxx,然后查看相关资源及其相应状态,此时PAY-xxxx的状态不太重要.

Does this mean that after the sale has status = completed I can no longer use this endpoint to get the payment/sale details? you can if you notice even though the sale status=completed the payment status is still "approved" (sale is a related_resource within payment). so you can always lookup a PAY-xxxx and then see what are the related resources and their corresponding status at this point the status of PAY-xxxx is less consequential.

付款是否会从Paypal的系统中删除,只剩下销售? 您仍然可以通过PAY-xxxx进行查询,因此建议它无论如何都不会被删除.

Does the payment get deleted from paypal's system, and only the sale remains? you can still query by the PAY-xxxx so it would suggest that it doesn't get deleted in anyways.

这篇关于Paypal REST-获取付款详细信息仅适用于“尚未完成"的付款吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆