批准后变更金额再授权

Reauthorization of changed amount after approval

我已经通过服务器端调用成功实施了 CONTINUE 支付流程。过程是:

  1. 使用我的 API
  2. 创建订单
  3. 让用户使用“继续”按钮批准它
  4. 然后在用户使用我的 API
  5. 单击提交按钮时捕获订单

问题是,在我的案例中,用户可以在他们批准订单的同一页面中更改项目。这意味着他们可能会在第二步之后决定将商品添加到购物篮中,在这种情况下,我会调用补丁订单,最终可能会增加数量。在 PayPal 文档中代表:

For any payment type, you can capture less than or the full original authorized amount. You can also capture up to 115% of or USD more than the original authorized amount, whichever is less.

但是,如果用户决定他们将增加订单金额,然后他们可以继续提交订单,并且在我的理解中捕获订单调用可能会失败,会发生什么情况。因为批准是 100 美元,但在修补订单和捕获之后我要求 200 美元。是否可以让用户在不使用重定向的情况下重新授权订单?这种情况甚至会发生吗(在沙盒中我无法重现)?最好的处理方法是什么?

You can also capture up to 115% of or USD more than the original authorized amount, whichever is less.

这仅适用于 授权 的捕获,特别是——即 intent:authorize 已完成状态的订单,其中 return 已为稍后在 29 天内捕获。

它不适用于尚未完成的订单 -- 它永远不会应用于 intent:capture 订单,因为它们没有 return 授权对象,而是直接捕获3 小时结帐批准。


What's the best way to handle it?

修补并获取所需金额的订单。在您的网站上确认付款之前,确保付款人了解他们将被收取的费用。