Magento – PayPal IPN’s not working correctly. Error 500

http-error-500ipnpaypal

I have got an issue with my 2 Magento websites.
Both sites are running PayPal Website Payments Pro Hosted Solution.

The issue is with the PayPal IPNs. All orders which come in are being stuck on ‘Pending Payment’ and I have to manually check if we have the payment – cancel that original and then hand enter a duplicate (hand entered orders get the status of pending).

I have explained the setup we have to PayPal and they said it should work fine, it doesn’t break their rules.
They said the IPN’s are failing with a http error code of 500 which means something is going wrong our end, and there is nothing they can do.

I opened up a ticket with simpleservers (our hosting company) and tried a few things which them but no joy.


This is the latest thing from PayPal:

Following a conversation with a Business Support agent, I have opened a new ticket to follow up on your issue.

Looking at your IPN History (which you can see yourself here ->(LINK). I can see that some of the IPNs are in "Retrying" status when we tried to send them to your IPN URL:

http://www.goodfoodandgifts.co.uk/paypal/ipn/

From PayPal's point of view, we will consider an IPN successfully sent when your integration responds with HTTP 200 OK, but in this case it's responding with HTTP 500 (Internal Server Error).

For example, you can see that a new IPN was triggered for Pro transaction 7VE97236S1009884X (latest in the account) and sent to your IPN URL but it failed with error 500.

Can you check further your IPN script to see why it's responding with HTTP 500? It appears only Website Payments Standard transactions IPN are working fine, and the others are receiving Retrying (Pro, Express Checkout, temporary holds, etc) so maybe the script is only prepared to handle Standard transactions.


This is the latest from SimpleServers:

I just tested this and it came back ok in the simulator

http://goodfoodandgifts.co.uk/paypal/ipn/

– Simple Servers Support

screenshot from simepleservers

Our web developer is out of the office right now, and has been for a few weeks, very unwell.

Am I making a silly mistake somewhere, does anyone know how to fix this?

Best Answer

Since you have demonstrated success through the simulator, there is likely something slightly different causing this problem with the live interaction between your and PayPal's servers.

Check your Apache and PHP error logs. Likely your server is encountering a PHP fatal error when it's returning the HTTP 500 to PayPal. You can Google to find out how to configure both Apache and PHP to log said errors.