贝宝-请求订单的多个授权

时间:2020-11-03 05:44:13

标签: paypal

如何为订单创建多个授权?

根据文档:

订单有效期为29天。在此期间,您可以请求一到十个或更多授权,以确保资金可用性。默认情况下,每个订单最多可以进行十个基本授权。 https://developer.paypal.com/docs/integration/direct/payments/orders/#overview

我尝试使用intent = authorize创建订单,然后使用

发布

https://api.paypal.com/v2/checkout/orders/orderId/authorize

首先它成功了,但是当我想创建另一个授权时,它给了我错误:

issue":"ORDER_ALREADY_AUTHORIZED","description":"Order already authorized.If 'intent=AUTHORIZE' only one authorization per order is allowed." "debug_id":"47084737aefa3"

所以我取消了原始授权,然后尝试创建一个新的授权,但仍然遇到相同的错误。

然后我更改了intent = capture,它给了我

"name":"UNPROCESSABLE_ENTITY","details":[{"issue":"ACTION_DOES_NOT_MATCH_INTENT","description":"Order was created with an intent to 'CAPTURE'. Please use v2/checkout/orders/order_id/capture to complete the transaction or alternately Create an order with an intent of 'AUTHORIZE'."

"message":"The requested action could not be performed, semantically incorrect, or failed business validation.","debug_id":"8c381672a8f1e"

任何帮助将不胜感激!!!

1 个答案:

答案 0 :(得分:1)

您链接到的文档是针对v1 /付款/订单的,这些文件已过时,并且在功能和目的上与v2 /结帐/订单非常不同。

v2 /结帐/订单只能被捕获一次。如果需要的话,介入授权步骤是可选的。