osCommerce Community Support Forums: Does anybody have PayPal IPN & GoDaddy working? - osCommerce Community Support Forums

Jump to content

Corporate Sponsors (view more of our hosting, developer, and service partners)


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Does anybody have PayPal IPN & GoDaddy working? Rate Topic: -----

#1 User is offline   CanadaRaceWear.com Icon

  • Find Posts
  • Group: Community Member
  • Posts: 15
  • Joined: 13-July 07
  • Real Name:Craig
  • Gender:Male
  • Location:Toronto, Canada

Posted 16 August 2007 - 02:14 PM

Hi,

I have a deluxe account on GoDaddy, and have just installed the PayPal IPN module, when I complete a transaction, PayPal gets paid, but my site is not updated. I have copied the additional code into ipn.php as suggested in the installation guide, but still get no reply. I do get hundreds of PayPal IPN Invalid Process Emails from the dubug. If anybody has got this to work on GoDaddy can you let me know if there is anything else that I need to do?

Any Help will be greatly appreciated, I'm sooooo close to going live!
Thanks
Craig
0

#2 User is offline   satish Icon

  • Find Posts
  • Group: Community Member
  • Posts: 4,817
  • Joined: 25-June 05
  • Real Name:Satish Mantri
  • Gender:Male
  • Location:Nagpur(India)

Posted 19 August 2007 - 05:59 PM

Godaddy does not block the paypal IPN post so it should work.
I had tested it on My site with sandbox and My site is on godaddy.

Satish
SEO must have: GWO( Google web optimization ),SEO-G, Header Tag SEO,Blog,substitute products,Product to article association,
View All Products,Google Site Map,Google Feed,Kill spider session,update robot.txt,product extra images,category description,articles manager,Google Analytics or Super Trekker plus, Link Manager contrib,Share Me button ++++++++
Proper image naming conventions.
proper product naming convention.
product content to have keywords and key phrases.



Just not a store, but a successful store is what should be the target.

Satish Mantri and OSCP team : A team of osCommerce analyst and experts
0

#3 User is offline   CanadaRaceWear.com Icon

  • Find Posts
  • Group: Community Member
  • Posts: 15
  • Joined: 13-July 07
  • Real Name:Craig
  • Gender:Male
  • Location:Toronto, Canada

Posted 21 August 2007 - 09:08 PM

View Postsatish, on Aug 19 2007, 01:59 PM, said:

Godaddy does not block the paypal IPN post so it should work.
I had tested it on My site with sandbox and My site is on godaddy.

Satish


Hi Satish,

Did you have to do anything besides updating the file from the installation doc

Anyone hosting on godaddy.com and using this module will need to make the following change to /ext/modules/payment/paypal_ipn/ipn.php:
Find (at or around line 71):
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
Add immediately after:
curl_setopt($ch, CURLOPT_PROXY, "HTTP://64.202.165.130:3128");
This is needed for communicating with PayPal.
Fix courtesy of Brian Christensen as posted on the support thread 25 August 2006

I still can't seem to get it to work, I've also tried what Jeff2005 suggests in this thread http://forums.oscomm...howtopic=273447
but that didn't work either! I don't understand what information is included in the debug email, because everything there looks as though the payment was processed, but it doesn't update my site.

Any suggestions will be appreciated
Thanks
Craig
0

#4 User is offline   satish Icon

  • Find Posts
  • Group: Community Member
  • Posts: 4,817
  • Joined: 25-June 05
  • Real Name:Satish Mantri
  • Gender:Male
  • Location:Nagpur(India)

Posted 22 August 2007 - 07:57 PM

Did u set IPN as true in Your Paypal profile.Chek that first.

Second If Yes chek Your logs as to which page the request from paypal is reaching.Your logs will have a page not found or something.if thats different location from where You have Your page then too this will happen.

Satish
SEO must have: GWO( Google web optimization ),SEO-G, Header Tag SEO,Blog,substitute products,Product to article association,
View All Products,Google Site Map,Google Feed,Kill spider session,update robot.txt,product extra images,category description,articles manager,Google Analytics or Super Trekker plus, Link Manager contrib,Share Me button ++++++++
Proper image naming conventions.
proper product naming convention.
product content to have keywords and key phrases.



Just not a store, but a successful store is what should be the target.

Satish Mantri and OSCP team : A team of osCommerce analyst and experts
0

#5 User is offline   CanadaRaceWear.com Icon

  • Find Posts
  • Group: Community Member
  • Posts: 15
  • Joined: 13-July 07
  • Real Name:Craig
  • Gender:Male
  • Location:Toronto, Canada

Posted 08 September 2007 - 03:54 PM

View Postsatish, on Aug 22 2007, 03:57 PM, said:

Did u set IPN as true in Your Paypal profile.Chek that first.

Second If Yes chek Your logs as to which page the request from paypal is reaching.Your logs will have a page not found or something.if thats different location from where You have Your page then too this will happen.

Satish


Hi Satish,

I don't have it set to true, as the module is supposed to do it all. Where can I find my logs, I checked my GoDaddy account, and couldn't find anything that looked like errors?

I Have tried to access ipn.php form my browser as suggested below

QUOTE(SteveDallas @ Aug 16 2006, 11:27 AM) *
If the status doesn't update, PayPal cannot access ipn.php, or your change to it has caused a problem. The first step would be to verify that you can access ipn.php through your browser. It should bring up a blank page with no error messages. If you have enabled debug email, you should also receive an email message entitled "PayPal IPN Invalid Process". This message is generated whenever ipn.php cannot process the POST variables sent to it. When you access ipn.php from your browser, there are no POST variables, so you get the email.

If accessing ipn.php results in an error message displayed in the browser, you will need to find the cause of the error and fix it. At that point, real transactions should get updated status automatically.

--Glen

This is the error I am getting

2013 - Lost connection to MySQL server during query

select count(*) as total from sessions where sesskey = '3ef7cd0ff35598dc20afebef41079bd7'

[TEP STOP]

2006 - MySQL server has gone away

select count(*) as total from sessions where sesskey = '3ef7cd0ff35598dc20afebef41079bd7'

[TEP STOP]


Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0

Any suggestions?

Thanks
Craig
0

#6 User is offline   bpopelar Icon

  • Find Posts
  • Group: Community Member
  • Posts: 311
  • Joined: 10-August 07
  • Real Name:Benedict F Popelar
  • Gender:Male
  • Location:Anaheim, CA

Posted 28 September 2007 - 01:46 AM

Did you ever figure out the "lost connection to MySQL server" issue with the Paypal IPN module?

I'm at the same point and I haven't found an answer. It seams like it is a configuration issue. My development system (a debian box on my private home network) does not generate the MySQL connection error. Something is different between the configuration of the development system and my GoDaddy base host account.

I too would like to understand what Satish means by checking the logs. There is currently no log file I can find on the GoDaddy site. Is there something I need to configure to get a log file produced in my hosting account?

Ben

This post has been edited by bpopelar: 28 September 2007 - 01:47 AM

0

#7 User is offline   bpopelar Icon

  • Find Posts
  • Group: Community Member
  • Posts: 311
  • Joined: 10-August 07
  • Real Name:Benedict F Popelar
  • Gender:Male
  • Location:Anaheim, CA

Posted 30 September 2007 - 07:26 AM

I finally figured out what is happening...

GoDaddy does not allow outbound http, https, or SSL socket connections from a hosted site. The first thing the ipn.php module attempts to do is establish an SSL socket connection back to PayPal. The attempted socket connection eventually times out (in 30 seconds) since GoDaddy does not allow outbound connections. The ipn.php module next attempts to establish a cURL connection with PayPal. This connection works if you have added the GoDaddy proxy server patch to the ipn.php module. Once a connection with PayPal is established, the module retrieves the data and happily goes about it's business.

The MySQL database timeout appears to be a side effect of the 30 second delay caused by the attempted SSL connection. When I shorten the SSL socket timeout to 5 seconds, the MySQL database timeout error does not occur; however, I don't want my customers to wait even 5 seconds when they don't have to so I modified the code to eliminate the SSL connection attempt.

The original socket connection code was (near line 33):

  if ( (PHP_VERSION >= 4.3) && ($fp = @fsockopen('ssl://' . $server, 443, $errno, $errstr, 30)) ) {
	$fsocket = true;
  } elseif (function_exists('curl_exec')) {
	$curl = true;
  } elseif ($fp = @fsockopen($server, 80, $errno, $errstr, 30)) {
	$fsocket = true;
  }


I modified it to be:

// Start of GoDaddy patch
// GoDaddy does not allow outbound SSL connections; you must use cURL via a proxy server.
// The SSL has been commented out to avoid the 30 second timeout delay (and the odd side effect
// of MySQL database timeout on session related data generated from appication_bottom.php
//  if ( (PHP_VERSION >= 4.3) && ($fp = @fsockopen('ssl://' . $server, 443, $errno, $errstr, 30)) ) {
//	$fsocket = true;
//  } elseif (function_exists('curl_exec')) {
  if (function_exists('curl_exec')) {
// End of GoDaddy patch
	$curl = true;
  } elseif ($fp = @fsockopen($server, 80, $errno, $errstr, 30)) {
	$fsocket = true;
  }


You'll also need to add the patch so that the cURL protocol uses the GoDaddy proxy server (not my original work - you can search the forum and find it). Near line 72 you will find the following code:

	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
	 $result = curl_exec($ch);


Just add the cURL proxy option before the curl_exec line:

	 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
	// GoDaddy hosted website proxy patch
	curl_setopt($ch, CURLOPT_PROXY, "http://proxy.shr.secureserver.net:3128");
	// End of GoDaddy proxy patch
	$result = curl_exec($ch);


Ben

This post has been edited by bpopelar: 30 September 2007 - 07:38 AM

0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic