IPN error -- IPN URL encoded -- where do I find this?
We've been getting error messages saying PayPal's IPN service can't connect with the page it's supposed to (ipn_main_handler.php).
The URL that the PayPal error message gives us is:
"https%3A%2F%2Fbrooklyntweed.net%2Fstore%2Fipn_main_handler.php"
GoDaddy (our host) says it's because the the URL is encoded. But where would I find this? I've checked the PayPal admin interface for IPN and it appears to be correct (no encoding). I've checked the admin interfaces for the PayPal modules on the cart and I don't see that url (or any url) in there.
I've also used the developer tool kit the search for this url and it comes up blank.
Can someone tell me where this url would be living?
Thanks,
John
Re: IPN error -- IPN URL encoded -- where do I find this?
Try to go to admin - modules - payment- paypal
and edit it.
Re: IPN error -- IPN URL encoded -- where do I find this?
Do you mean via the admin interface, or the files themselves?
Re: IPN error -- IPN URL encoded -- where do I find this?
Re: IPN error -- IPN URL encoded -- where do I find this?
Quote:
Originally Posted by
jgold723
We've been getting error messages saying PayPal's IPN service can't connect with the page it's supposed to (ipn_main_handler.php).
The URL that the PayPal error message gives us is:
"https%3A%2F%2Fbrooklyntweed.net%2Fstore%2Fipn_main_handler.php"
GoDaddy (our host) says it's because the the URL is encoded. But where would I find this? I've checked the PayPal admin interface for IPN and it appears to be correct (no encoding). I've checked the admin interfaces for the PayPal modules on the cart and I don't see that url (or any url) in there.
I've also used the developer tool kit the search for this url and it comes up blank.
Can someone tell me where this url would be living?
Thanks,
John
When I go to brooklyntweed.net/store, I'm redirected to brooklyntweed.net. I don't know where the redirect is coming from, but my guess is that that's the source of your problem. What is the full text of the PayPal error message? It might help to identify the solution.
Re: IPN error -- IPN URL encoded -- where do I find this?
Quote:
Originally Posted by
lat9
When I go to brooklyntweed.net/store, I'm redirected to brooklyntweed.net. I don't know where the redirect is coming from, but my guess is that that's the source of your problem. What is the full text of the PayPal error message? It might help to identify the solution.
I believe there's a redirect that the original designer put in to send people who try to go straight to the store site. But I don't believe that has any effect if you use the full url to the ipn_main_handler.php file.
Re: IPN error -- IPN URL encoded -- where do I find this?
Hi CVINHAIB -- I looked in the admin interface -- none of the PayPal modules have an entry for the url to the ipn_main_handler.php file. At least not that I could find.
Re: IPN error -- IPN URL encoded -- where do I find this?
I think when you edit the paypal that you are using, you will see url of ipn main handle.
Re: IPN error -- IPN URL encoded -- where do I find this?
I did and it isn't there -- there's no field for the Instant Payment Notification URL -- unless I'm looking in the wrong spot.
Re: IPN error -- IPN URL encoded -- where do I find this?
Quote:
Originally Posted by
jgold723
Hi CVINHAIB -- I looked in the admin interface -- none of the PayPal modules have an entry for the url to the ipn_main_handler.php file. At least not that I could find.
Quote:
Originally Posted by
cvhainb
I think when you edit the paypal that you are using, you will see url of ipn main handle.
Look at the paypal information on the "page" before you click the edit button, or at the top of the window after you do, there is some information about the path that should be setup for the store to function with PayPal.
Somewhat surprised that no one has talked about the settings in your configure.php files related to where your store really is (subdirectory of shop, or in root directory), or about .htaccess redirects, but almost more impportantly, if you the store owner log into your host account/ftp into it, does the ipnhandler.php file exist in a subdirectory of shop off of your public_html folder? We need to verify the basics to help chase down this error. I think it was asked earlier also to provide as much of the error message as security allows. Like if need to obscure the admin directory or similar, please do.
The encoding that was referred to, may have only been done at the "last moment" in order to store the content of the URI in a fully readable format. If presented decoded, then it may be that a space or some other character would look right, but would process wrong. By showing the standard replacement values for forward slash, colon, etc, the link canbe verified to be correct. But... I could be wrong about that as well. Just thinking of most likely reasons to have this issue
Re: IPN error -- IPN URL encoded -- where do I find this?
Sorry about that. The text of the email from PayPal is below. A little more background information:
-- there is an ipn_main_handler.php file in the sub directory referenced by the url -- in fact if you decode the url, it points correctly to the ipn_main_handler.php file;
-- the PayPal module does have a reference to a url to this file - but it is an instruction to place that URL in my PayPal account information (on the PayPal site) and not an editable path
Here's the error email:
Hello xxxxxx,
Please check your server that handles PayPal Instant Payment Notifications (IPN). IPNs sent to the following URL(s) are failing:
https%3A%2F%2Fbrooklyntweed.net%2Fstore%2Fipn_main_handler.php
If you do not recognize this URL, you may be using a service provider that is using IPN on your behalf. Please contact your service provider with the above information. If this problem continues, IPNs may be disabled for your account.
Thank you for your prompt attention to this issue.
Thanks,
PayPal
Re: IPN error -- IPN URL encoded -- where do I find this?
Quote:
Originally Posted by
jgold723
Sorry about that. The text of the email from PayPal is below. A little more background information:
-- there is an ipn_main_handler.php file in the sub directory referenced by the url -- in fact if you decode the url, it points correctly to the ipn_main_handler.php file;
-- the PayPal module does have a reference to a url to this file - but it is an instruction to place that URL in my PayPal account information (on the PayPal site) and not an editable path
Here's the error email:
Hello xxxxxx,
Please check your server that handles PayPal Instant Payment Notifications (IPN). IPNs sent to the following URL(s) are failing:
https%3A%2F%2Fbrooklyntweed.net%2Fstore%2Fipn_main_handler.php
If you do not recognize this URL, you may be using a service provider that is using IPN on your behalf. Please contact your service provider with the above information. If this problem continues, IPNs may be disabled for your account.
Thank you for your prompt attention to this issue.
Thanks,
PayPal
Good, so, file exists where it should, error message from paypal seems to indicate that there is some issue getting to/accessing the file. Do you have ipn handling activated in PayPal and has the appropriate directory been provided to PayPal?
I tried the decoded path and had no redirect away from that area.so the next question, is there more than one version of the store installed at/near that directory? (Assuming the above request has already been done before posting this and no problem(s) were found)
So, even if the above path exists, is it going to a somewhat "inactive" store that won't be able to do anything with the information?
Re: IPN error -- IPN URL encoded -- where do I find this?
That is the active store -- there isn't any other. And yes, IPN handling has been activated in PayPay and the correct address to that file has been entered there (https://www.brooklyntweed.net/store/...in_handler.php).
It seems that PayPal is trying to use an encoded version of the url
(https%3A%2F%2Fbrooklyntweed.net%2Fstore%2Fipn_main_handler.php)
which doesn't work -- I just can't figure out where it would get that.
Re: IPN error -- IPN URL encoded -- where do I find this?
I "believe" by default the older IPN paypal modules for Zen Cart use PayPal's "Name-Value Pair" API. This API indicates all values sent via a POST must be urlencoded.
If PayPal's API is sent a "NOTIFYURL" it will use the URL sent. If one is not sent, the notification URL from your Merchant Profile (on PayPal) is used.
Zen Cart does send "NOTIFYURL" to PayPal (correctly urlencoded as per PayPal's documentation)... Sounds like possibly an error on PayPal's side (not correctly decoding the value)? You might also want to double check what is configured as the notification URL in your PayPal Merchant Profile.
One quick workaround may be to stop using PayPal IPN and use PayPal Express Checkout...
Re: IPN error -- IPN URL encoded -- where do I find this?
Hmmm, you just brought up an interesting point that I hadn't considered.
We actually are using the two modules below:
PayPal Website Payments Pro (USA) PayPal 0 Processing Info
PayPal Express Checkout via Payflow Pro PayPal 0 Processing
And not website payments standard
PayPal Website Payments Standard - IPN PayPal Info
So why would we be getting error notices regarding IPN? Can I/should I disable IPN on the Paypal side? Is that the problem?
Re: IPN error -- IPN URL encoded -- where do I find this?
Not sure... I was just looking at the code + API (v1.3.9h and 1.5.1)... Typically the notification URL is how an IPN method tells your store the transaction posted (if my memory is correct). Maybe someone more knowledgeable will have the answers?
You may also want to check out this thread on PayPal Communications (and some tools for debugging IPN).
One other item I should note... If you are really running 1.3.9a, you should probably upgrade at least to 1.3.9h... In the long term, it may be worth just upgrading to Zen Cart 1.5.x... If I am remembering correctly Zen Cart 1.5.x includes (among many other changes) updates to the PayPal modules...
Re: IPN error -- IPN URL encoded -- where do I find this?
Another interesting point -- someone stated here that URLs are supposed to be encoded, per PayPal's API instructions. Yet, the answer we got from PayPal would seem to indicate otherwise:
=====
However, when I checked the transaction that you are doing, you are passing the variable:
paymentrequest_0_notifyurl="https%3A%2F%2Fbrooklyntweed.net%2Fstore%2Fipn_main_h andler.php"
when doing the DoExpressCheckoutPayment API call. This is causing the error. It seems that the URL was encoded. Can you please check with your developer to see if they had accidentally encoded the value when passing it to our server during the call?
========
Re: IPN error -- IPN URL encoded -- where do I find this?
PayPal has multiple APIs. The Zen Cart modules include support for Payflow and NVP (the default).
From your later post it appears you have your site configured to use PayPal Express Checkout via Payflow Pro (also known as Payments Pro and Website Payments Pro). So in your case, PayPal is correct the URL should not be encoded.
Payflow does not require encoded values. NVP does require encoded values. Looking at the source code for "paypal_curl.php" in Zen Cart 1.3.9h and Zen Cart 1.5.1 the included PayPal modules follow those (and other) requirements.
I would highly suggest upgrading your copy of Zen Cart to a newer version. Version 1.3.9a is over 3.5 years old and things change (including the APIs used by 3rd parties such as PayPal). There is a good chance more up to date versions of Zen Cart will play better with PayPal.
What was the result of running the PayPal IPN debugging tools?
Notes:
You can enable logging (as well as PAYPAL_DEV_MODE) to record (and later review) the entire process and see what is being sent to PayPal. This will let you verify the data being sent by Zen Cart (including the NOTIFYURL).
Zen Cart's included PayPal modules (1.3.9h - 1.5.1) for PayFlow populate "NOTIFYURL" for "DoExpressCheckoutPayment" as per the Payflow API (not "paymentrequest_0_notifyurl").