退款 Paypal Capture 返回 REFUND_FAILED_INSUFFICIENT_FUNDS

问题描述

支付宝环境:

  • 沙盒
  • 结帐 API v2(PHP + JS)
  • Webhooks 事件处理

我正在尝试使用 Paypal Checkout API v2 为 Capture 退款。

我实现了以下 Paypal 结账流程:

  1. 客户选择“Paypal”作为付款方式
  2. 创建 Paypal 订单:new OrdersCreateRequest();
  3. 捕获付款:new OrdersCaptureRequest($orderId);
  4. Webhook 事件处理(订购和捕获事件)...
  5. 退款捕获付款:new CapturesrefundRequest( $captureId);
  6. Webhook 事件处理(退款事件)...

一切正常。 但是如果客户在步骤 #1 选择 Sofort 或 GiroPay 而不是 Paypal 作为付款方式,我在第 5 步执行 CapturesrefundRequest 时遇到以下 Paypal 错误

{   
    "name":"UNPROCESSABLE_ENTITY","message":"The requested action Could not be performed,semantically incorrect,or Failed business validation.","debug_id":"1a6a... etc.","details":[{
        "issue":"refund_Failed_INSUFFICIENT_FUNDS","description":"Capture Could not be refunded due to insufficient funds. Please check to see if you have sufficient funds in your PayPal account or if the bank account linked to your PayPal account is verified and has sufficient funds."
    }],"links":[{
        "href":"https://developer.paypal.com/docs/api/payments/v2/#error-refund_Failed_INSUFFICIENT_FUNDS","rel":"information_link"
            
    }]
}

我在沙盒模式下做这件事。我的 SandBox 帐户配置正确且经过修改认银行账户已关联,并且在 PayPal SandBox-Account 中有足够的资金。

在退还“sofort”或“giropay”付款时,我不知道这里出了什么问题。

在这里阅读https://developer.paypal.com/docs/business/payment-methods/

在右侧列(退款)中,某些付款方式可立即退款(Paypal、Visa),但其他方式(sofort、giropay 等)可在 180 天内退款等。

我会根据这些功能得到那个错误吗?? 如果是?那么如何退还此类付款,或者不可能以编程方式退还此类付款?或者如何管理此类问题?

如果您需要更多详细信息,请发表评论

非常感谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)