PayPal Sandbox Classic API Express Checkout NVP Internal Server Error (500)
Asked Answered
O

2

6

Quick Summary:

I'm developing an e-commerce site using PHP. It uses PayPal to make payments. I have been successfully using (from sending the request string via SetExpressCheckout to DoExpressCheckoutPayment to GetExpressCheckoutDetails to storing payment details in the MySQL database) PayPal's Sandbox mode with their Classic API Express Checkout (NVP) from sometime late last year till now. It was all working fine until last night and no major changes have been made to the PayPal section of the site. Now I get an "Internal Server Error" at https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=[TOKEN] on every payment request.

Walkthrough:

What I see:

Paypal SetExpressCheckout return:

Array
(
    [TOKEN] => XX-XXXXXXXXXXXXXXXXX
    [TIMESTAMP] => 2015-03-28T20:27:25Z
    [CORRELATIONID] => XXXXXXXXXXXXX
    [ACK] => Success
    [VERSION] => 109.0
    [BUILD] => 15840636
)

PayPal Sandbox error message at link listed above:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Why I can't find an answer:

  • The generic "Internal Server Error" message means I have no clue where to start looking since I'm not sure if the problem is with me (which would be my default assumption) or with PayPal.
  • Most solutions point to a mismatch between production and sandbox URL / API credentials. This is NOT the problem. I have been successfully using Sandbox credentials with the Sandbox link for some time now.
  • All PayPal Internal Server Error problems that I have found are for people using the REST API (or with IPN). I am using the Classic-API-driven Express Checkout and I don't see any debug_id returned or how I would get it.
  • All problems in the past could be solved by looking at the returned error message (ACK=Failure&L_ERRORCODE0=['some error code']&L_SHORTMESSAGE0=['short error message']&L_LONGMESSAGE0=['detailed error message']). There is no error message here because it registers as a success.
  • I have tried changing the API credentials and get the standard security headers error (I then switch back and the error goes away and returns to the Internal Server Error on redirect).
  • I have tried tinkering with the request string but I feel fairly confident that is not the problem since when I deliberately mess it up I get the standard error message for that.
Ozmo answered 29/3, 2015 at 0:16 Comment(4)
I have the same problem! Perhaps its a Paypal issue!Tonsil
I tried a new test: 1) Run the example cURL command from the API guide found here (verbatim), 2) Copy the returned token and paste it on to the end of the link given on the next page of the same guide (copy this link, add token to end), 3) Internal Server ErrorOzmo
i am experiencing the same problem, too. interestingly, if i specify a billing agreement in the SetExpressCheckout api without any payment details, the internal server error doesn't occur. i believe the problem is on the paypal end. sent them an email. still waiting for a response.Adulterine
Has everyone problem still fixed? It seems that I am having similar issues again after it temporarily worked 2 days ago!Tonsil
L
2

After reporting this issue with a log to PayPal they responded by confirming this is a known issue on their end.

Dear Philip,

Thank you for contacting PayPal Merchant Technical Services about the internal server error on the sandbox environment. This is a known issue currently that is being investigated and hopefully will be resolved soon. I will let you know when I have confirmation the issue is fixed. Thank you.

Sincerely,

Mike

Merchant Technical Support

PayPal, an eBay Company

Update from PayPal:

Dear Philip, The Sandbox issue should be resolved now and you should not be seeing the Internal Server 500 error. If you haave any other issues please let us know, https://www.paypal.com/mts

Sincerely,

Mike

Merchant Technical Support

PayPal, an eBay Company

I've tested and it does appear to be fixed.

Larochelle answered 30/3, 2015 at 20:16 Comment(3)
I received a similar pair of messages, ran several tests, and it appears to be working in all cases for me now too.Ozmo
This problem seemed to have cropped up again very recently after temporarily working. Is it working for everyone else still?Tonsil
@YahyaUddin everything seems to still be working just fine. Check your settings and if it persists reach out to PayPal.Larochelle
C
2

Internal Server Error means internal to the PayPal server. This is PayPal's "Help! I give up!" error message.

This does not rule out the possibility that there is something you have done wrong that has lead PayPal's code off the green path and into the woods where it was eaten by a bear, but regardless: do as the error page says and contact PayPal support. They should be able to look up your correlation ID and see what happened. Then they can let you know whether you can work around the issue by making a change on your end or whether your code is all good and it is 100% their issue. And then they can improve their code so that the next person who may make an error similar to yours gets better feedback.

(Although in the case of a page such as this that is normally displayed to your customer, not to you, PayPal generally gives only a relatively generic failure message.)

And a few other things I would check if you want to work on this a bit more while you wait for PayPal to get back to you: you verified that the API seems to actually be working as it claims. Sensible thing to check, but the error is on the web redirect so focus on that: what do you get if you pass a known-bogus token? WHat happens on another computer or after you clear your cookies? What do you get if you try to do a button payment (not express checkout) with the same pair of accounts?

Clywd answered 29/3, 2015 at 13:27 Comment(1)
Here is a quick update on what I have tried so far: 1) Bogus token -> "This transaction is invalid. Please return to the recipient's website to complete your transaction using their regular checkout flow.", 2) Clear cookies/everthing/ccleaner + multiple browsers + other comp -> Internal Server Error (unchanged), 3) Button payment with same accounts (in sandbox) -> PayPal works normally.Ozmo
L
2

After reporting this issue with a log to PayPal they responded by confirming this is a known issue on their end.

Dear Philip,

Thank you for contacting PayPal Merchant Technical Services about the internal server error on the sandbox environment. This is a known issue currently that is being investigated and hopefully will be resolved soon. I will let you know when I have confirmation the issue is fixed. Thank you.

Sincerely,

Mike

Merchant Technical Support

PayPal, an eBay Company

Update from PayPal:

Dear Philip, The Sandbox issue should be resolved now and you should not be seeing the Internal Server 500 error. If you haave any other issues please let us know, https://www.paypal.com/mts

Sincerely,

Mike

Merchant Technical Support

PayPal, an eBay Company

I've tested and it does appear to be fixed.

Larochelle answered 30/3, 2015 at 20:16 Comment(3)
I received a similar pair of messages, ran several tests, and it appears to be working in all cases for me now too.Ozmo
This problem seemed to have cropped up again very recently after temporarily working. Is it working for everyone else still?Tonsil
@YahyaUddin everything seems to still be working just fine. Check your settings and if it persists reach out to PayPal.Larochelle

© 2022 - 2024 — McMap. All rights reserved.