Jump to content


Photo

Don't give HTTP 500 error when invoice is not found


As per the recommendation I have set my PayPal IPN preferences to call the Nexus script all the time, this means PayPal contacts my server for transactions not made through the website.

Nexus's current response is a HTTP 500 Internal Server Error for these messages, along with a HTML response [#30X111] Could not locate transaction. This causes PayPal to retry sending the same message repeatedly, even though Nexus will never send a HTTP 200 response.

Status: Not a Bug
Version: 1.4.2
Fixed In:


3 Comments

In PayPal, specify a plain HTML page that will always send a 200 response as the URL - Nexus sends an override for each transaction anyway.
That seems counterintuitive though, and besides Nexus shouldn't be sending 500 errors anyway because technically there is no 'internal server error'.
Yes there is - the page the notification is hitting is "Invoice not found" - that's an error page, so it gets a HTTP response which is appropriate. It would be incorrect to send a 200.

PayPal needs to be configured for the circumstances applicable - I agree the solution is counter-intuitive, but that's because PayPal is counter-intuitive. IMO, any transaction which sends a notification URL should cause PayPal to send an IPN, but unfortunately you have to enable it and specify a URL - that's PayPal's rule.