
Getting Started With Express Checkout
Troubleshooting Your Express Checkout Integration
26 August 7, 2012 Express Checkout Integration Guide
Error Handling
The response message contains an ACK value. Unless ACK=Success, you must check further
for an error or warning message.
You must check each response from the PayPal server for an indication that an error occurred.
Because there are several warning and failure values, the safest way to check the response is to
check for ACK=Success. If the ACK returns any other value, you must examine the response
for error numbers and messages.
A non-successful response can contain more than one error number and message. Error fields
start with L_ERRORCODE
n, where n, starting from 0, identifies a unique error in the response.
There are two messages for each error number, L_SHORTMESSAGE
n and L_LONGMESSAGEn,
where
n corresponds with n in L_ERRORCODEn.
IMPORTANT: Because error numbers are not guaranteed to be unique, you must use both the
number and the messages to determine the appropriate action to take when an
error occurs.
Some errors are transitory in nature and you can retry the operation; for example, an error that
indicates a problem with PayPal. If the problem persists for more than an hour, it is probably
related to your Express Checkout implementation because PayPal servers are up and running
almost all of the time.
Some errors indicate problems with the buyer’s account; for example, the funding source is no
longer valid or the buyer’s account is restricted in some way. The error message has enough
information to create a message on your website that tells the buyer how to resolve the issue.
Often, you simply prompt the buyer to choose a different funding source. Because these kinds
of problems can indicate a risk issue, you do not want to ship goods until the issue has been
resolved.
Other errors indicate a problem with your integration, such as accepting invalid input on your
website and passing it in your request message to PayPal. You need to perform sufficient
testing using the Sandbox to prevent problems from arising after going live.
Timeouts
A timeout situation occurs if an API operation’s completion status is not known or the buyer
navigates away from the page that receives the response before PayPal completes the
operation. You must not ship goods before receiving a valid transaction ID, which indicates
that PayPal accepted the payment.
It is safe to execute the API operation again if the status is not known. In the case of
DoExpressCheckout, you can execute GetExpressCheckoutDetails and examine the
CheckoutStatus field. Any value other than PaymentCompleted indicates that the
payment has not completed. You should not ship goods until you receive a valid transaction ID
from calling either DoExpressCheckoutPayment or GetExpressCheckoutDetails.
Commentaires sur ces manuels