问题
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?
回答1:
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.
回答2:
You must define some options in Profile in "Website Payment Preferences"
来源:https://stackoverflow.com/questions/7173066/paypal-express-checkout-10410-invalid-token