Forums / Built-in Shipping and Payment Modules / Issues with Paypal IPN

Issues with Paypal IPN

Results 1 to 20 of 22
24 Aug 2008, 21:25
#1
jimothyinnothy avatar

jimothyinnothy

New Zenner

Join Date:
Aug 2008
Posts:
16
Plugin Contributions:
0

Issues with Paypal IPN

Hi guys n gals,
Hope you can help, I am running Zen Cart Version 1.3.8, and have activated the payment module Paypal IPN. If I test the site with a purchase, it takes me thru to paypal, I log in, pay, and then it attempts to redirect me back to the shop, but all I get is a blank page with a massive URL. The shop does not log the order, but Paypal has taken the money. I have ensured that in paypal:

# in Website Payments Preferences the Automatic Return URL to:
http://www.************.com/shop/index.php?main_page=checkout_process

#Instant Payment Notification Preferences URL is:
http://www.************.com/shop/ipn_main_handler.php

and the paypal generated key has been put back across to Zen.

Now before I posted, I did google, and search this forum, and found the IPN test script, which when run produces this:

[PHP]IPNCHECK.PHP - Version 1.0

IPN TESTING - POSTING to PayPal via: ssl://www.paypal.com:443


Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/atthered/public_html/shop/ipncheck.php on line 81

Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://www.paypal.com:443 (php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution) in /home/atthered/public_html/shop/ipncheck.php on line 81
IPN FATAL ERROR :: Could not establish fsockopen.
Host Details = ssl://www.paypal.com:443 (0) php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution

Trying again without SSL ...


Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/atthered/public_html/shop/ipncheck.php on line 85

Warning: fsockopen() [function.fsockopen]: unable to connect to www.paypal.com:80 (php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution) in /home/atthered/public_html/shop/ipncheck.php on line 85
IPN FATAL ERROR :: Could not establish fsockopen.
Host Details = ssl://www.paypal.com:443 (0) php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution

Warning: fputs(): supplied argument is not a valid stream resource in /home/atthered/public_html/shop/ipncheck.php on line 91

Warning: feof(): supplied argument is not a valid stream resource in /home/atthered/public_html/shop/ipncheck.php on line 94[/PHP]

Now I am not a silly silly person, but this error stream is a bit beyond me. Can anyone translate this into what is wrong/what I have done wrong?

The server is running that Cpanel poo, on a fedora core 7 base as a host.

I am really open to suggestions, as this is really beginning to vex me horifically.

Thanks in advance

J
24 Aug 2008, 21:32
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Issues with Paypal IPN

jimothyinnothy:

Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution

You'll need to talk to your hosting company and ask them to configure their server's name resolution services properly, since the server cannot do nameserver lookups in order to access external servers.
24 Aug 2008, 21:35
#3
jimothyinnothy avatar

jimothyinnothy

New Zenner

Join Date:
Aug 2008
Posts:
16
Plugin Contributions:
0

Re: Issues with Paypal IPN

DrByte:

You'll need to talk to your hosting company and ask them to configure their server's name resolution services properly, since the server cannot do nameserver lookups in order to access external servers.


That will present me with a little issue then, as this is my own box!! I suppose I had better get googling on this one then :(

Thanks chap.
25 Aug 2008, 17:49
#4
jimothyinnothy avatar

jimothyinnothy

New Zenner

Join Date:
Aug 2008
Posts:
16
Plugin Contributions:
0

Re: Issues with Paypal IPN

All sorted now. Thanks for your help.
It was due to the server not being set up to resolve DNS, stumbled across it whilst trying to ping a domain name in the shell.
26 Aug 2008, 00:22
#5
sheehan avatar

sheehan

New Zenner

Join Date:
Jun 2007
Posts:
34
Plugin Contributions:
0

Re: Issues with Paypal IPN

jimothyinnothy:

All sorted now. Thanks for your help.
It was due to the server not being set up to resolve DNS, stumbled across it whilst trying to ping a domain name in the shell.


Could you be a bit more specific about what you did to fix the problem? I have am having the exact same issue you had.
20 Nov 2009, 20:56
#6
laisunshine avatar

laisunshine

New Zenner

Join Date:
Nov 2007
Posts:
59
Plugin Contributions:
0

Re: Issues with Paypal IPN

Hello,
I am having the same issue. How did you solve this? It's really annoying my customers. I only happens to a few customers that I am aware of. Otherwise the transactions are going through.

Thanks!
20 Nov 2009, 21:03
#7
jimothyinnothy avatar

jimothyinnothy

New Zenner

Join Date:
Aug 2008
Posts:
16
Plugin Contributions:
0

Re: Issues with Paypal IPN

The servers resolv.conf was not configured correctly, and on top of that fsockopen was not compiled into the apache/php config.
But to be honest, I have had this a few time recently, and it is always a variety of things that cause it. The last one was me calling an IP address instead of a URL for callback, and the IP address was made redundant by Paypal. Changed it to a dns based URL instead of an IP based one and it was fine.

If you get stuck, let me know and I will see if I can help.
20 Nov 2009, 21:10
#8
laisunshine avatar

laisunshine

New Zenner

Join Date:
Nov 2007
Posts:
59
Plugin Contributions:
0

Re: Issues with Paypal IPN

It's wierd because it only happens every once in a while. Mainly when people use their paypal accounts through express checkout.

So I need to talk to my hosting provider? Where did you find the ipn test script?

this is what Paypal told me:
PayPal found that my URL's are posting for the "RETURNURL" and "CANCELURL" values to be:
RETURNURL: https://xxxxxx.com/ipn_main_handler.php?type=ec"
CANCELURL: https://xxxxxx.com/index.php?main_page=login&ec_cancel=1

Did you have this?
20 Nov 2009, 21:20
#9
jimothyinnothy avatar

jimothyinnothy

New Zenner

Join Date:
Aug 2008
Posts:
16
Plugin Contributions:
0

Re: Issues with Paypal IPN

Cant remember where it was on here, but if you at my profile and then look at my other messages, it will be on one of the threads in there.

If now I have uploaded it to a bit of webspace as a text file which you can then copy the contents of and upload to your space to run.
Will PM you the URL rather than posting it on here.
24 Nov 2009, 15:45
#11
laisunshine avatar

laisunshine

New Zenner

Join Date:
Nov 2007
Posts:
59
Plugin Contributions:
0

Re: Issues with Paypal IPN

I used the test ipn tool and there weren't any errors. It seems to be communicating correctly. I asked Paypal why the customer is still getting sent back to a blank page and he told me to change the RETURNURL. What file is this in and how do I change it? I feel that I shouldn't need to play with the Paypal files. Any suggestions?
24 Nov 2009, 17:20
#12
ooba_scott avatar

ooba_scott

Zen Follower

Join Date:
Jul 2009
Posts:
218
Plugin Contributions:
0

Re: Issues with Paypal IPN

have you set up the return URL in the paypal backend?

If not you need to Log into Paypal, go to Profile - Website Payment preferneces

And turn on auto Return for website payments.

The return URL is usually something like the following:

http://www.my_domain.com/shop/index.php?main_page=checkout_process



Hope this helps :)

Scott
24 Nov 2009, 17:26
#13
laisunshine avatar

laisunshine

New Zenner

Join Date:
Nov 2007
Posts:
59
Plugin Contributions:
0

Re: Issues with Paypal IPN

Hello,
Thanks for the response. I did that too. I have 2 stores that run on 1 paypal account. I set the return url for one of the store like I am supposed to. The customer will use express checkout to fill in their info. When they are done with that, they are supposed to be directed back to the store but instead some customers get sent back to a blank IPN main handler page and their transaction never goes through. Paypal was telling me to change the returnurl for the express checkout but I don't know where this is or how to do it. Thanks! Any suggestions?
24 Nov 2009, 17:29
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Issues with Paypal IPN

laisunshine:

The customer will use express checkout to fill in their info. When they are done with that, they are supposed to be directed back to the store but instead some customers get sent back to a blank ... page ...


So ... this is a problem with Express Checkout, and not with the "PayPal IPN" payment module (which this thread was originally discussing), right?

In that case, the problem is not the Return URL, but rather it's probably some sort of PHP error you're encountering, perhaps as a result of an incomplete file upload and/or a bad language/template file customization you've made.

FAQ on troubleshooting blank pages: https://www.zen-cart.com/tutorials/index.php?article=82
Article on enabling PayPal-specific debug logging: http://www.zen-cart.com/forum/showthread.php?t=61199
24 Nov 2009, 18:50
#15
laisunshine avatar

laisunshine

New Zenner

Join Date:
Nov 2007
Posts:
59
Plugin Contributions:
0

Re: Issues with Paypal IPN

This is what Paypal told me:

"
You shouldn't want to change the IPN listener URL, you're receiving IPN posts fine and the IPN listener URL you have set up in your account doesn't effect the "RETURNURL" for Express Checkout. I don't know if you have access to the code, but if you do, find the "RETURNURL" you're passing in your "SetExpressCheckout" call. If you don't have access to the code, view the Express Checkout settings in your PayPal account and ensure you're passing the correct "RETURNURL".

The "RETURNURL" is not something that you can set in your PayPal account. Its set in the script you're sending to PayPal to process your Express Checkout transactions.

Like I said previously, if you have access to the code itself, find the script that's creating the request to PayPal and change the "RETURNURL". If you have a developer, have him or her do it for you. If the shopping cart software you're using doesn't allow access to the code, then you will have to go through their interface to change the "RETURNURL"." -Paypal


What do I do?
24 Nov 2009, 19:11
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Issues with Paypal IPN

Zen Cart is automatically setting the RETURNURL for you. It points to "www.your_store.com/ipn_main_handler.php?type=ec", which is the correct URL for a Zen Cart store.
There is no need to change it in the code.

As I said in my last post, if you're getting blank pages, you have a problem on your site to fix. It's not a PayPal issue.
24 Nov 2009, 19:57
#17
laisunshine avatar

laisunshine

New Zenner

Join Date:
Nov 2007
Posts:
59
Plugin Contributions:
0

Re: Issues with Paypal IPN

Thank you! I will double check pages that might have extra spaces. You are so helpful!
17 Mar 2011, 21:43
#18
courage9 avatar

courage9

New Zenner

Join Date:
Jan 2009
Posts:
74
Plugin Contributions:
0

Re: Issues with Paypal IPN

OK...for two weeks I've been rebuilding, researching, slapping things around, and I'm just about done with all of it...:censored:

Just so I could ensure that it wasn't something I did...I did a complete new install of Zen Cart V.1.3.9h and installed PayPal Express...

I loaded the demo items, and made one test item for a dollar. I added my test item to the cart and selected the PayPal express button...it took me to PayPal where I completed the sale with my credit card and then awaited for the auto return to my site......never did return..

I went to PayPal and verified that my IPN was turned on and this was the address listed: https://rastajoe.com/zen/ipn_main_handler.php
which is the same as it shows in my Admin of my Cart. My PayPal Express Checkout is set to Auto and my Site Admin settings are:
Enable this Payment Module
True

Sort order of display.
0

Payment Zone
--none--

Express Checkout Shortcut Button
On

Set Order Status
Processing [2]

Set Unpaid Order Status
Pending [1]

Set Refund Order Status
Pending [1]

Express Checkout: Require Confirmed Address
No

Express Checkout: Select Cheapest Shipping Automatically
No

Express Checkout: Skip Payment Page
Yes

Express Checkout: Automatic Account Creation
No

Payment Action
Final Sale

Transaction Currency
Only USD

PayPal Page Style
Primary

API Signature -- Username
https://rastajoe.com/zen/ipn_main_handler.php

API Signature -- Password
****************

API Signature -- Signature Code
****************

PayPal Mode
PayPal

Live or Sandbox
live

Debug Mode
Off

I verified that my email address for my cart and for PayPal match!
I've been a Business Member for over 5 years...
My Host verified that Port 80 and 443 are open for bidirectional.
My Site is setup as SSL ...and I do NOT share it.
I get no errors when I access my sites ipn_main_handler
I have used both testing tools as suggested in the "Things to check if not working, and here's the results:

The curltester.php said everything checked out.
The ipntester.php had all kinds of errors...I included them in a attachment!
My .htaccess is empty
I removed and reinstalled the module several times...
My IPN in PayPal is:
https://rastajoe.com/zen/ipn_main_handler.php Which matches my site.
In Website Payment Preferences: Auto Return is ON
Return URL is: https://rastajoe.com/zen/index.php?main_page=checkout_process
PDT is ON
Encrypted Website Payments is set to OFF
PayPal Payment Optional is ON
Support giropay and bank transfer payments: NO
ALL Tax and Shipping Fess in PayPal are OFF

My Website Eorror Log is extensive and I have included it a attachment..I have no idea how to read it?

I'm out of IDEA'S and ready to break something....PLEASE HELP!
17 Mar 2011, 21:53
#19
courage9 avatar

courage9

New Zenner

Join Date:
Jan 2009
Posts:
74
Plugin Contributions:
0

Re: Issues with Paypal IPN

PS. I turned on the debug in Admin and I got 10 emails with errors I can't understand....If someone will help I will send the emails separately...thanks
17 Mar 2011, 22:30
#20
courage9 avatar

courage9

New Zenner

Join Date:
Jan 2009
Posts:
74
Plugin Contributions:
0

Re: Issues with Paypal IPN

ok...I've deleted everything off my server and reinstalled for the 5th time today...This time I did not use the demo store...I did a full install and created 1 item for testing. I went in and turned on PayPal Express and verified all the settings and did a test purchase....STILL nothing...

I'm not dumb, so my first instinct is that either my Host (who claims they are not) or PayPal...is blocking this crap from going through...here is the basic info from one of the error logs:

[text] => An error occurred when we tried to contact the
payment processor. Please try again, select an alternate payment method, or
contact the store owner for assistance. () - (7) couldn't connect to
host

This is exactly what was showing in my Real Store...the one that's been down for two weeks now...

Help

P.S. I am now going to try and use a second Business Account with PayPal to see if it's isolated to something I can't think of...