Help Article

Why did I get error 4002 when using PDT?

Issue
While you were using Payment Data Transfer, PayPal returned general error code 4002.

Causes
This error may have several different causes, such as:
  • An invalid tax token.
  • Cookies.
  • Cache.
  • Internet congestion.
  • The email address isn't confirmed on the PayPal account receiving the payment.

With regard to Payment Data Transfer (PDT), error 4002 simply means that the request couldn't be completed, usually because the information being sent back is:
  • Incorrect.
  • Posting to the Sandbox instead of the Live site.
  • Requesting the same transaction data more than five times.

Solutions
If an invalid tax token produced error 4002, you can resolve it using Classic ASP:
  
txToken = "ThisIsABogusTaxToken, ThisIsA2ndBogusTaxTokenPassedInWhenACreditCardIsUsed"
iFindComma = InStr(txToken,","
if iFindComma > 0 then
txToken = left(txToken,iFindComma-1)
end if
query = "cmd=_notify-synch&tx=" & txToken & "&at=" & g_paypal_token
We’re sorry. The page you’re looking for is no longer available. To search again or contact us, please visit our Help Centre.