Zen Cart Logo
Forums / PayPal Express Checkout support / Help with paypal express: ipn_main_handler.php

Help with paypal express: ipn_main_handler.php

Views: 5,089

Results 1 to 15 of 15
24 May 2011, 4:01 PM
#1
shessorandom avatar

shessorandom

New Zenner

Join Date:
May 2011
Posts:
1
Plugin Contributions:
0

Help with paypal express: ipn_main_handler.php

I had a customer email me with problems completing checkout. I tried to checkout myself and I am getting the following error message in google chrome.<br>The website encountered an error while retrieving http://shessorandom.com/zencart/ipn_main_handler.php?type=ec. It may be down for maintenance or configured incorrectly. What is the problem? How do I fix it?:frusty::frusty:

25 May 2011, 8:39 PM
#2
cdcalvert avatar

cdcalvert

New Zenner

Join Date:
Jan 2008
Location:
Coeur d'Alene, Idaho
Posts:
10
Plugin Contributions:
0

Re: Help with paypal express: ipn_main_handler.php

I am encountering this problem also.

15 Apr 2012, 8:46 PM
#3
batman36 avatar

batman36

New Zenner

Join Date:
Jan 2008
Location:
Herkimer, New York, United States
Posts:
25
Plugin Contributions:
0

Re: Help with paypal express: ipn_main_handler.php

Has anyone ever answered this.. using zen 1.50 and now can't complete checkout

16 Apr 2012, 4:33 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Help with paypal express: ipn_main_handler.php

batman36:

Has anyone ever answered this.. using zen 1.50 and now can't complete checkout
With respect, your post contains so little information it's impossible to give you any answers. One can't even accurately assume that you're getting the exact same symptoms, let alone error message, based on so little detail.
Please click Reply below and answer all the questions in the Posting Tips section on that page, and be sure to include exact error message information and exact steps that can consistently trigger the problem on multiple different computers and different browsers.

14 Jun 2012, 10:07 AM
#5
icedragon avatar

icedragon

New Zenner

Join Date:
May 2012
Posts:
13
Plugin Contributions:
0

Re: Help with paypal express: ipn_main_handler.php

We have just received an email from PayPal saying that that IPNs are failing and in fact they have disabled them.

When I looked at the PayPal Express settings in the shop it was saying that ipn_main_handler.php should be in the root directory instead of in the shop where it actually resides.

The shop isn't live yet but tested successfully with paypal express in May, so must have had the correct address in then. The errors are more likely to be coming from a donations button that has been on the site for a few years.

Can zencart 1.50 co-exist with paypal payment buttons ?

14 Jun 2012, 12:32 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Help with paypal express: ipn_main_handler.php

IceDragon:

Can zencart 1.50 co-exist with paypal payment buttons ?
Yes, but the Instant Payment Notification URL you specified in your PayPal's account profile settings must point to a link that actually responds properly.
If it doesn't respond, then PayPal will send you the notice you're reporting.

14 Jun 2012, 1:57 PM
#7
icedragon avatar

icedragon

New Zenner

Join Date:
May 2012
Posts:
13
Plugin Contributions:
0

Re: Help with paypal express: ipn_main_handler.php

I've rechecked the link to the root directory and it does work correctly

So all I need now is to discover is how to turn off IPN on Pay Pals own buttons ...............

14 Jun 2012, 2:12 PM
#8
icedragon avatar

icedragon

New Zenner

Join Date:
May 2012
Posts:
13
Plugin Contributions:
0

Re: Help with paypal express: ipn_main_handler.php

I should have said that I retested the link and it worked fine. Everything between Zen Cart and Pay Pal is working.

just the dratted button that currently is being used live is sending notifications to the Zen Cart url and generating errors.

14 Jun 2012, 3:20 PM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Help with paypal express: ipn_main_handler.php

Under normal circumstances Zen Cart will properly respond to IPN notices sent by PayPal buttons.

You'll need to find out what exactly PayPal is encountering when trying to send the IPNs. You may be able to see stuff in your PayPal account's IPN History screen, or contact PayPal at https://www.paypal.com/mts to find out what exactly their servers are encountering when those specific notices are sent. Armed with that information then you can sort out what's happening on your site.

Further, turn on your store's PayPal debug logging: http://www.zen-cart.com/showthread.php?61199-Debug-Logging-PayPal and post the log file content related to failed notices for those button-based transactions. (Don't need, or want, to see stuff from your store's transactions)

14 Jun 2012, 3:53 PM
#10
icedragon avatar

icedragon

New Zenner

Join Date:
May 2012
Posts:
13
Plugin Contributions:
0

Re: Help with paypal express: ipn_main_handler.php

I've set it to log and told it to resend one of the failed notifications. The logs folder is writable but nothing has appeared there.

According to Pay Pals page on the error the IPN message should give a clue to the problem so I compared one of the ones with an error to the test one I did earlier. Different layouts but the zen cart one finishes with &ipn_track_id=xxxxxxx while on the failed one it is very near the top.

No log had appeared yet.

15 Jun 2012, 7:51 AM
#11
icedragon avatar

icedragon

New Zenner

Join Date:
May 2012
Posts:
13
Plugin Contributions:
0

Re: Help with paypal express: ipn_main_handler.php

PayPal say

Currently your IPN is failing due to it's response of an HTTP 404 error where PayPal needs a 200 OK response

which is logical since the url isn't where the file is but is where the module says it should be .............

15 Jun 2012, 8:16 AM
#12
icedragon avatar

icedragon

New Zenner

Join Date:
May 2012
Posts:
13
Plugin Contributions:
0

Re: Help with paypal express: ipn_main_handler.php

I didn't want to mess with the zen cart requirements so I put a notify_url pointing to the right directory on a button and now have a log :) A nice clear one saying exactly what happened so it should be ok

It hasn't appeared in the IPN history though - I don't know how quickly that should happen.

15 Jun 2012, 8:41 AM
#13
icedragon avatar

icedragon

New Zenner

Join Date:
May 2012
Posts:
13
Plugin Contributions:
0

Re: Help with paypal express: ipn_main_handler.php

nicely showing sent in the IPN history so I'm happy :)

Thank you DrByte for pointing me in the right direction :)

I'm still curious about the handler picking up zencart IPNs sent to the site rather than the directory the shop lives in.

15 Jun 2012, 5:30 PM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Help with paypal express: ipn_main_handler.php

If you've got a different handler set up for your "non Zen Cart" paypal-button transactions, then you need to tell PayPal to use THAT handler's URL in your PayPal IPN Notification URL setting.

Zen Cart doesn't care what IPN Return URL you have, as long as it's turned ON. Zen Cart always supplies the correct URL to PayPal with every transaction, regardless of what IPN Return URL you've set up inside PayPal.

Zen Cart's "paypal setup instructions" tell you to set it to Zen Cart's ipn_main_handler.php file BECAUSE MOST people don't have any other handler, and you can't leave the URL field blank. But if you're using another handler for processing buttons that come from transactions that did NOT initiate from Zen Cart (such as your custom "buttons"), then you need to use THAT handler for your Paypal profile IPN Notification URL setting.

16 Jun 2012, 6:27 AM
#15
icedragon avatar

icedragon

New Zenner

Join Date:
May 2012
Posts:
13
Plugin Contributions:
0

Re: Help with paypal express: ipn_main_handler.php

Thank you :)
I didn't want to mess with the zen cart settings but now life will be a lot simpler :)

btw I've just discovered that the latest Opera update 12.0 makes it almost impossible to use for admin as the drop down lists now show almost off-screen to the left. ah well - off to another browser ......... or change back to the last version .........