沙盒上的支出错误

Payouts errors on Sandbox

我正在尝试使用 REST API 创建支付功能,但几乎没有错误。

当我发送此请求时:

{"sender_batch_header":{"sender_batch_id":"test_0","email_subject":"RaceBets Withdrawal","recipient_type":"PAYPAL_ID"},"items":[{"recipient_type":"PAYPAL_ID","amount":{"currency":"EUR","value":"20.0"},"receiver":"XXXX","note":"Hello there!","sender_item_id":"71292226"}]}

我收到了:

JAXBException occurred : 4 counts of IllegalAnnotationExceptions. 

或:

{"name":"REQUIRED_SCOPE_MISSING","message":"Access token does not have required scope.","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#REQUIRED_SCOPE_MISSING"}

第二个错误也很奇怪,因为付款工作正常,范围也很好

{"scope":"https://uri.paypal.com/services/subscriptions https://api.paypal.com/v1/payments/.* https://api.paypal.com/v1/vault/credit-card https://uri.paypal.com/services/applications/webhooks openid https://uri.paypal.com/services/invoicing https://api.paypal.com/v1/vault/credit-card/.*","access_token":"xxx","token_type":"Bearer","app_id":"APP-xxx","expires_in":28800}

有什么想法吗?

对于第二个错误,请确保您已在 developer.paypal.com 的应用程序下选中 "payouts" 的选项。

转到developer.paypal.com --> 控制面板 --> 我的应用程序 --> 单击您的应用程序名称 --> 应用程序功能。 Select 在这里支付。

关于REQUIRED_SCOPE_MISSING的错误,我也遇到过。按照其他发帖人的描述添加范围解决了这个问题。

请注意,更改范围(即添加付款)后,可能需要 几个小时 才能反映更改,因此您将继续收到错误一段时间。这让我在测试时感到困惑,因为我没想到沙箱会有这种延迟。