Magento Forum

IPN Notification Failure emails being received from paypal
 
jaw041099
Jr. Member
 
Total Posts:  4
Joined:  2012-06-29
 

Hi everyone.

I have just setup community 1.7 and have it standard with a template (no other 3rd party extensions) on a single site and have got paypal standard working, the last glitch I have is that I am receiving daily emails from paypal stating-

“Please check your server that handles PayPal Instant Payment Notifications (IPN). Instant Payment Notifications sent to the following URL(s) are failing:
http://www.mysite.co.uk/paypal/ipn/ “

I have searched through the forums and this address is what I have read should be set in paypal. The directory.... /paypal/ipn/ doesnt exist though? Am I supposed to create this manually as a work around or am I pointing the IPN to the wrong area?

From what I have read magento overrides this during the checkout, so I assume it is purely for paypals test purposes.

Thanks for your help

 
Magento Community Magento Community
Magento Community
Magento Community
 
jaw041099
Jr. Member
 
Total Posts:  4
Joined:  2012-06-29
 

I have now received a notification telling me they are going to switch off IPN if this isnt resolved, so am desperate for a resolution anyone ???

 
Magento Community Magento Community
Magento Community
Magento Community
 
jaw041099
Jr. Member
 
Total Posts:  4
Joined:  2012-06-29
 

Ok, no response on here which is very disapointing for a forum for such a big platform,particulary when it is such a widespread problem from what I have been reading. (rant over)

I have been digging further and found the following. And the good news is I think I have found a workaround (no warranties implied here, but it is where I am at now and I can get my site to work), now I am no techy so please bear with me this is more laymans terms than technically correct.

Firstly.

Setting up paypal standard in magento 1.7 works, remember to be set Payment Action in the paypal standard setting in magento to “sale”

I have the return url (not ipn) set to http://www.yoursite.com/index.php, I am not sure if this is correct but its working (change yoursite.com to your address).

IPN Notifications have to be enabled in paypal for the paypal standard to work with magento, on the forum you will find that it is recommended to use http://mysite.com/paypal/ipn/. This is because to enable IPN Notifications you have to enter something in the URL field in paypal. The directory doesnt exist, but when magento sends details to paypal of a transaction to paypal, it overrides the setting and gives it another IPN URL (what I dont know) so all your website sales will work properly (marked as processing in the order).

This causes the problem.
We have established that the website is working fine...BUT.....

Paypal doesnt distinguish between transactions on the paypal account, it just sends an IPN notification whenever a transaction occurs, so if like me you have ebay sales going to the same paypal account, then everytime you sell something it will send an IPN Notification to http://mysite.com/paypal/ipn/.
These non magento sales never send anything back to paypal as the directory doesnt exist, let alone have a script in it that talks back to paypal, paypal will try resending it upto 16 times and then it will be marked as a IPN failure and you will start receiving IPN failure notification emails, after this happens XXX times paypal disables IPN notifications as it deems them as not working properly.
This is when the sales from the website no longer get marked as processing as there are no longer IPN Notifications telling it to.

Just to simplify - with ipn notifications innitially on, website sales will go through fine, other transactions will fail, IPN Notifications will eventually become disabled and then no notifications will be sent to the website either meaning they will never be marked “processing”.

I found this out from contacting paypal, and this was there response

---------------------------------------------------------------------------------------------------------------------------------------
Hello,

Thank you for calling PayPal today.

I have opened a new ticket to follow up on your issue.

These are the different status that an IPN message can have:

- “Sent”: From PayPal’s point of view, we will mark the notification as correctly sent only if your notification URL respond with the Standard HTTP 200 OK.

- “Retrying”: A message will stay in “Retrying” status for about 16 retries. The reason is that your notification URL is not sending us a correct HTTP response.

- “Failed”: When a “Retrying” notification reaches the limit of retires, the notification status will change to Failed.


According to your own IPN History, it appears that PayPal is attempting to send such notifications to the following URL:

https://www.digmytshirt.co.uk/paypal/ipn/

but your Website is sending us the HTTP response 503, so we will keep Retrying until reaching 16 retries.

---------------------------------------------
503 Service Unavailable
The server is currently unavailable (because it is overloaded or down for maintenance).Generally, this is a temporary state.
---------------------------------------------

This is most likely an issue with a wrong configuration in your server or a problem with your IPN Script.

Please consult with your Website developer in order to troubleshoot this issue. Your own server logs should have more information about the incoming IPN from PayPal, and we only have the IPN History to track the IPN messages.

Alternatively, you can try first with one of the following sample scripts, which are proven to work:

https://www.paypaltech.com/SG2/

If you have further questions or updates to this issue, please feel free to contact me again.

Regards,
Huseyin
PayPal MTS

-------------------------------------------------------------------------------------------------------------------------------------------------

The workaround that seems to have worked for me.

Basically the idea is to let the website deal with its own IPN Notifications in its own way, then I worked out how to get a notification sent back for the non website transactions so they dont fail. (please change any reference to “yoursite.com” below, to your domain name)

1. Firstly I created a hotmail account just for ipn notifications, you will see why shortly (i didnt want my own mail filled up with them)

2. I created the following directories on my server - http://www.yoursite.com/paypalipn/ipn/
NOTE - Do not create http://www.yoursite.com/paypal/ipn/.... This conflicts with whatever is used in the IPN Notification process for magento sales and they dont get marked processed (that is what I tried first!)

3. I utilised one of the scripts suggested in the paypal message at
https://www.paypaltech.com/SG2/, I selected PHP, then I used the “ipn-php send email(raw ipn nicely formatted)"option as the others created html pages and other things, and with this one I could deal with the end result email.
I set the email address asked for in the creation process of the file to the hotmail one I created.

4. I created a PHP file on my server named it “ipnlistener.php”, this was saved in the ipn folder I created, so I now have http://www.yoursite.com/paypalipn/ipn/ipnlistener.php

5. I Pasted the code from paypal into the “ipnlistener.php” file, changed the “$mail_From” variable email address from the generic one paypal insert, to the same as the hotmail one I created (dont know if I had to but it I did). There are 2 lines this needs changing on, but they are easily spotted any way. Then save the file.

6. Then in the paypal IPN Notifications settings on paypal, I set it to point to the new file, http://www.yoursite.com/paypalipn/ipn/ipnlistener.php
Do not point it just to the folder http://www.yoursite.com/paypalipn/ipn/ , it must point to the ipnlistener.php file within it.

Voila, I now get the magento sales marked as processing, and the other paypal transactions no longer fail meaning IPN notifaction warnings stop and they never get turned off.

The only downside is having to have an email address for all the notifications to go to. If someone more versed with PHP than myself can alter the code for the ipnlistener.php file that is produced (I dont think this part is necessary, I think it is used for testing purposes) then the process would be a lot neater.

Hope this helps others and makes this onging issue easier for Joe Bloggs like me to get there head around. Its not that big a problem, if I can get a workaround (I am no techy trust me) I dont understand why it is not fixed in magento.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ripsaw
Jr. Member
 
Total Posts:  2
Joined:  2008-08-02
 
\\\"jaw041099\\\" -


The workaround that seems to have worked for me. .

Hi, I just wanted to thank you for the provided solution. I haven’t tried out yet if your solution is working for us but your post is the first I found which is providing a solution for exactly the problem we are dealing with.

Best Regards,

Mathias
www.merchandiseme.de

 
Magento Community Magento Community
Magento Community
Magento Community
 
hiroprotagonist
Jr. Member
 
Total Posts:  23
Joined:  2012-01-22
 

Hi Jaw,

Thank you very much for the detailed instructions for the rest of us - much appreciated.
I haven’t tried your suggestion yet - just about to right now - but just a quick question: was there any difference between the Payal sandbox and the “real thing” or was the result the same ?
I’m somehow clinging to the hope that it might be related to the sandbox site but experience tells me that’s not it…
Will get back to you if it worked for me in 1.7.0.2.

Thanks again mate !

hiro

 
Magento Community Magento Community
Magento Community
Magento Community
 
haligonia
Sr. Member
 
Total Posts:  97
Joined:  2009-02-28
 

I just called PayPal technical support and they told me the solution.

It is very simple: just turn off the IPN notification settings in your PayPal account. They are not necessary because the IPN url will be sent by Magento to PayPal for each transaction. In this way, you get the IPN call only for Magento transactions and not for any other transaction (such as eBay sales).

I am about to try this solution and will report back on whether it works.

 
Magento Community Magento Community
Magento Community
Magento Community
 
hiroprotagonist
Jr. Member
 
Total Posts:  23
Joined:  2012-01-22
 

Hi all,

Just tried switching off IPN on my Paypal (production, not sandbox), put through a transaction and payment status is still pending payment. This is serious: it\’s a production bug, emails don\’t get sent to customers and there seems to be no way to fix this.
Can someone from Magento make this a priority issue please ? I can\’t believe that only a handful of people seem to be effected…
For the record: I\’m on 1.7.0.2, no payment-related extensions installed, pretty much a vanilla setup.
Willing to test if someone has suggestions…

hiro

 
Magento Community Magento Community
Magento Community
Magento Community
 
haligonia
Sr. Member
 
Total Posts:  97
Joined:  2009-02-28
 

I am posting this follow-up to say that I disabled IPN notifications in my PayPal account and everything is still working fine.

The IPN url setting in PayPal doesn’t have an effect on Magento because Magento is sending the IPN url with each transaction request anyways. Each time Magento sends a transaction to PayPal, this IPN url will override the default IPN settings in your PayPal account so that, in other words, the settings in the PayPal account have no effect on Magento.

I checked my IPN history in PayPal and the IPN notifications are being successfully sent back to Magento even though I disabled the global settings in PayPal. On the Magento side, everything is working smoothly too.

So PayPal’s technical support were correct in stating that you do not need to set the global IPN settings in your PayPal account. You will still get IPN notifications for your Magento site. And then no IPN notifications will be sent for non-Magento transactions such as eBay (which is why these warning emails from PayPal were being sent in the first place.)

Hope that helps someone.

 
Magento Community Magento Community
Magento Community
Magento Community
 
DWJames
Jr. Member
 
Avatar
Total Posts:  5
Joined:  2011-02-02
 

Just to add to this, I had the same issue and tried the same with our 1.7.0.2 CE store, but I found that if IPN was turned off at the paypal end, nothing ever came through for magento.
So although we don’t use ipn for eBay, we need a way of our server receiving IPNs for our eBay orders rather than just refusing them.
I asked our Paypal manager who got an answer from their tech support:

Magento is sending the IPN Notify URl directly via the Code.
They are using the parameter noptify_url.
This parameter will override all IPN settings you’ve ,made in your paypal account.
So in order to get MAgento and eBay IPN working seperately, i would suggest to create a second IPN script and place it on your Server.

We are providing a script generator as well, have a look here:

www.paypaltech.com/SG2

Once that is done, please enter the URL of this second script in your paypal account:

Log into your account at https://www.paypal.com
Click on the Profile subtab
click ‘My selling preferences
click on Update next to Instant Payment notifications
Enter your IPN URL in the Notification URL field
Make sure the radio button for ‘Receive IPN messages (Enabled)’ is selected
Click Save

Once that is done, all IPN for ebay will go to your profile URl and the Magento IPN’s will actually go to whatever URL Magento is submitting through the Code.

I hope this was helpful and if you have any further Questions, please do let me know.

So yeah, it seems Paypal have a helpful way of sorting this, it’s just that most people aren’t aware....

So, to clarify, you need to do this if you also use paypal for something OTHER THAN Magento (like eBay) otherwise any IPN messages that get sent for those other transactions are lost/rejected, paypal notice this and disable ALL of your IPN messages.
This method gives you a script to sit on your server which can receive these other IPN messages properly (even if you then do nothing with them) and keep everything happy and ticking along.

Hope that helps,
James

 
Magento Community Magento Community
Magento Community
Magento Community
 
lukebarker
Jr. Member
 
Total Posts:  1
Joined:  2011-11-01
 

Hi

this just redirects me to developr Paypal site now - does anyone know where to find the script generator of http://www.paypaltech.com/SG2 ?

Getting these warnings and worried they will disable the site! ARGH!

thanks

Luke

 
Magento Community Magento Community
Magento Community
Magento Community
 
jerbourg
Jr. Member
 
Total Posts:  10
Joined:  2008-09-18
 

Same - I cannot find the script - can anyone post it?

 
Magento Community Magento Community
Magento Community
Magento Community
 
DanNisbet
Jr. Member
 
Total Posts:  1
Joined:  2013-01-19
 

If anyone is still looking for the IPN sample scripts referred to above, I found what I believe is the new location here, in the Paypal GitHub repo: https://github.com/paypal/ipn-code-samples

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top