我正在尝试使用 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 上的应用程序下选中“付款”选项。
转到developer.paypal.com --> DashBoard --> 我的应用程序 --> 单击您的应用程序名称 --> 应用程序功能。在此选择付款。
关于rest - 沙盒上的支付错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29820168/