当我尝试执行以下操作时收到无效 token 错误:
curl -s --insecure -H "X-PAYPAL-SECURITY-USERID:<paypal sandbox user id>" -H "X-PAYPAL-SECURITY-PASSWORD:<paypal sandbox password>" -H "X-PAYPAL-SECURITY-SIGNATURE:<paypal sandbox security signature>" -H "X-PAYPAL-REQUEST-DATA-FORMAT:NV" -H "X-PAYPAL-RESPONSE-DATA-FORMAT:JSON" -H "X-PAYPAL-APPLICATION-ID:APP-80W284485P519543T" https://svcs.sandbox.paypal.com/Invoice/CreateAndSendInvoice -d "requestEnvelope.errorLanguage=en_US&invoice.merchantEmail=merchant_1328956628_per@gmail.com&invoice.payerEmail=payer_1329716425_biz@gmail.com&invoice.currencyCode=USD&invoice.itemList.item(0).name=Banana+Leaf+--+001&invoice.itemList.item(0).description=Banana+Leaf&invoice.itemList.item(0).quantity=1&invoice.itemList.item(0).unitPrice=1&invoice.itemList.item(0).taxName=Tax1&invoice.itemList.item(0).taxRate=10.25&invoice.paymentTerms=Net10"
我收到以下错误:
{"responseEnvelope":{"timestamp":"2012-09-18T08:06:27.801-07:00","ack":"Failure","correlationId":"2d3c5f95a76d9","build":"3566933"},"error":[{"errorId":"570054","domain":"PLATFORM","subdomain":"Application","severity":"Error","category":"Application", “消息”:“无效 token ”}]}
我无法找到因获取无效 token 错误而发送至此处的参数出了什么问题。请帮忙。
最佳答案
确保您的商家电子邮件 (invoice.merchantEmail) 与沙盒帐户中的商家电子邮件地址相同。
关于curl - 使用 cURL 执行时 Paypal Invoice api 出现无效 token 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12480052/