curl - 使用 cURL 执行时 Paypal Invoice api 出现无效 token 错误

标签 curl paypal paypal-sandbox

当我尝试执行以下操作时收到无效 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/

相关文章:

Python:PyCurl 设置 URL 异常

cURL - - 摘要命令

ruby-on-rails - Ruby on Rails SaaS 免费计费管理

paypal - 从 PayPal 立即购买按钮获取库存 list

paypal - 使用 JavaScript 提交 PayPal 按钮时出现间歇性 500 错误

php - fopen() : SSL: Connection reset by peer error in php

c - 如何用 curl 做 keepalive http 请求?

java - 在基于 Java/Spring 的应用程序中实现 PayPal

php - 在哪里可以找到结算协议(protocol) ID 然后在结帐时使用它

curl - Paypal REST API 沙箱 - SSL 连接错误