Paypal 快速结帐:10410 无效令牌
我在网站上使用 Paypal Express Checkout API,在沙箱网站上遇到错误。 USER、PWD 和 SIGNATURE 字段已被验证且正确。为了便于阅读,我已将 & 符号替换为换行符。
首先,我的 SetExpressCheckout 请求:
USER=xxx
PWD=xxx
SIGNATURE=xxx
VERSION=76.0
METHOD=SetExpressCheckout
RETURNURL=xxx
CANCELURL=xxx
REQCONFIRMSHIPPING=0
NOSHIPPING=1
LOCALECODE=FR
SOLUTIONTYPE=Sole
LANDINGPAGE=Billing
PAYMENTREQUEST_0_AMT=86.11
PAYMENTREQUEST_0_CURRENCYCODE=EUR
PAYMENTREQUEST_0_ITEMAMT=72.00
PAYMENTREQUEST_0_TAXAMT=14.11
PAYMENTREQUEST_0_INVNUM=1tyZq03X5c8
PAYMENTREQUEST_0_PAYMENTACTION=Sale
PAYMENTREQUEST_0_PAYMENTREQUESTID=1tyZx03f5c8
Paypal 的响应如下:
TOKEN=EC%2d9FE8384171515313J
TIMESTAMP=2011%2d08%2d24T08%3a44%3a36Z
CORRELATIONID=696e70dbd6086
ACK=Success
VERSION=76%2e0
BUILD=2055089
用户在 Paypal 网站上填写付款并返回到上面指定的确认 URL 后,我运行 GetExpressCheckoutDetails:
USER=xxx
PWD=xxx
SIGNATURE=xxx
VERSION=76.0
METHOD=GetExpressCheckoutDetails
TOKEN=EC-9FE8384171515313J
响应为:
TIMESTAMP=2011%2d08%2d24T08%3a45%3a56Z
CORRELATIONID=6a2bbe8363462
ACK=Failure
VERSION=76%2e0
BUILD=2055089
L_ERRORCODE0=10410
L_SHORTMESSAGE0=Invalid%20token
L_LONGMESSAGE0=Invalid%20token%2e
L_SEVERITYCODE0=Error
提供令牌的代码一个月没有改变(直到几分钟前它才正常工作)。从日志来看,我的请求结构没有变化,所以我假设这一定是 PayPal 方面的配置问题。
一个可能很重要的细节:在系统开始出现故障之前,我在沙箱中重置了卖家帐户,但我确保 API 凭据是正确的(当我重置卖家帐户时,它们没有更改)。
有什么想法为什么我突然收到此错误吗?
I Am using the Paypal Express Checkout API on my web site, and encountering an error while on the sandbox site. The USER, PWD and SIGNATURE fields have been verified and are correct. I have replaced ampersands with newlines for readability.
First, my SetExpressCheckout request:
USER=xxx
PWD=xxx
SIGNATURE=xxx
VERSION=76.0
METHOD=SetExpressCheckout
RETURNURL=xxx
CANCELURL=xxx
REQCONFIRMSHIPPING=0
NOSHIPPING=1
LOCALECODE=FR
SOLUTIONTYPE=Sole
LANDINGPAGE=Billing
PAYMENTREQUEST_0_AMT=86.11
PAYMENTREQUEST_0_CURRENCYCODE=EUR
PAYMENTREQUEST_0_ITEMAMT=72.00
PAYMENTREQUEST_0_TAXAMT=14.11
PAYMENTREQUEST_0_INVNUM=1tyZq03X5c8
PAYMENTREQUEST_0_PAYMENTACTION=Sale
PAYMENTREQUEST_0_PAYMENTREQUESTID=1tyZx03f5c8
The response from Paypal is as follows:
TOKEN=EC%2d9FE8384171515313J
TIMESTAMP=2011%2d08%2d24T08%3a44%3a36Z
CORRELATIONID=696e70dbd6086
ACK=Success
VERSION=76%2e0
BUILD=2055089
After the user fills in the payment for on the Paypal site and returns to the confirm URL specified above, I run the GetExpressCheckoutDetails:
USER=xxx
PWD=xxx
SIGNATURE=xxx
VERSION=76.0
METHOD=GetExpressCheckoutDetails
TOKEN=EC-9FE8384171515313J
The response is:
TIMESTAMP=2011%2d08%2d24T08%3a45%3a56Z
CORRELATIONID=6a2bbe8363462
ACK=Failure
VERSION=76%2e0
BUILD=2055089
L_ERRORCODE0=10410
L_SHORTMESSAGE0=Invalid%20token
L_LONGMESSAGE0=Invalid%20token%2e
L_SEVERITYCODE0=Error
The code that provides the token has not changed for a month (and it worked correctly until several minutes ago). Judging from the logs, there was no change in the structure of my requests, so I am assuming this must be a configuration problem on the PayPal side.
A detail which might be of importance: I reset the seller account in the sandbox before the system started to malfunction, but I made sure that the API credentials are the correct ones (they did not change when I reset the seller account).
Any ideas why I am getting this error all of a sudden?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
帐户重置操作似乎也禁用了 API 凭据,但有一个小时左右的延迟,在此期间 API 凭据保持活动状态,但在使用它们时发生了奇怪的事情。
一小时后,API 凭据被有效禁用,因此我只使用了新的凭据,一切正常。
简而言之:在沙盒中执行帐户重置时,请计划一个小时的停机时间。
It seems that the account reset operation also disables the API credentials, but there was a delay of an hour or so during which the API credentials remained active, but strange things happened when using them.
After an hour, the API credentials were effectively disabled, so I just used the new ones and everything works fine.
In short: when performing an account reset in the sandbox, plan for an hour of downtime.
您必须在“网站付款首选项”的个人资料中定义一些选项
You must define some options in Profile in "Website Payment Preferences"