我尝试创建PayPal发票时收到401错误.我正在使用nodejs REST API:
https://github.com/paypal/rest-api-sdk-nodejs
我使用创建发票样本进行了快速测试,将configure.js中的id和secret更改为我在sandbox中的应用程序.当这种情况发生时我也会得到401.该应用程序设置为允许发票操作(当我请求令牌时它在范围参数中),是否还需要启用其他内容?
我联系了PayPal技术支持,他们说要联系PayPal MTS.当我联系他们时,他们说要联系技术支持......我假设这是一个帐户相关的东西,因为这是我在样本中唯一改变的东西.
编辑2014-09-17
我可以用curl获得一个令牌:
{"scope":" https://uri.paypal.com/services/applications/webhooks https://uri.paypal.com/services/invoicing openid https://api.paypal.com/v1/payments/.*https://api.paypal.com/v1/vault/credit-card/*.https://api.paypal.com/v1/vault/credit-card " "的access_token":" A015QDaSWWVrhK.FNSZVZd-vDGflSm .g1H.4PnDeXaYDFqo", "token_type": "承载", "APP_ID": "APP-80W284485P519543T", "expires_in":28800}
我正在使用来自github(configure.js和invoice/create.js)的样本,我唯一改变的是配置中的客户端和秘密.