gpt4 book ai didi

Paypal Refund Rest Api v2 - 由于权限不足导致授权失败

转载 作者:太空宇宙 更新时间:2023-11-03 15:46:16 30 4
gpt4 key购买 nike

我能够成功执行以下 API

/v2/checkout/orders
/v2/checkout/orders/{order_id}/authorize
/v2/checkout/orders/{order_id}/capture

为什么我在按照此处所述执行 PayPal 退款时收到“NOT_AUTHORIZED”响应? - https://developer.paypal.com/docs/api/payments/v2/#captures_refund

POST 请求

https://api.sandbox.paypal.com/v2/payments/captures/<Capture ID I got from capture request>/refund

响应

    {
"name": "NOT_AUTHORIZED",
"message": "Authorization failed due to insufficient permissions.",
"debug_id": "6c6xxxxx6c",
"details": [
{
"issue": "PERMISSION_DENIED",
"field": "capture_id",
"value": "XXXXXXXXX",
"description": "You do not have permission to access or perform operations on this resource.",
"location": "path"
}
],
"links": [
{
"href": "https://developer.paypal.com/docs/api/v2/payments/#NOT_AUTHORIZED",
"rel": "information_link"
}
]
}

最佳答案

您必须联系 PayPal 支持,为 V2 退款和取消请求添加现有 ClientId 和客户密码(适用于 PayPal V1 API)的权限,并且没有其他方法可以设置相同的权限。如果您需要避免这种情况,那么只需从 PayPal 帐户创建新的 ClientId 和 Client secret,它将与 PayPal V2 API 一起正常工作。

关于Paypal Refund Rest Api v2 - 由于权限不足导致授权失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54907374/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com