Forums / Upgrading from 1.3.x to 1.3.9 / 1.3.8a paypal ipn

1.3.8a paypal ipn

Locked

Views: 8,433

Results 1 to 20 of 27
This thread is locked. New replies are disabled.
15 Dec 2007, 7:44 PM
#1
thesaintjim avatar

thesaintjim

New Zenner

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

1.3.8a paypal ipn

Anyone else see that the order # is blank when returned to your page after a transaction? Also, the order # and product is not passed to the paypal site... Any thoughts? I knwo this is related to the meta tag file, but thought it may have been fixed by now as those threads are from 2006..

15 Dec 2007, 8:04 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: 1.3.8a paypal ipn

No, it's not related to metatag files.
It's simply the fact that PayPal's server isn't talking to your server to let it know the payment is completed.
http://www.zen-cart.com/wiki/index.php/PayPal

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

17 Dec 2007, 6:11 PM
#3
thesaintjim avatar

thesaintjim

New Zenner

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

Re: 1.3.8a paypal ipn

Ah, I missed the return url..it was incorrect in paypal profile. Thanks

18 Jan 2008, 1:53 AM
#4
aeolidia avatar

aeolidia

Zen Follower

Join Date:
Mar 2005
Posts:
166
Plugin Contributions:
0

Re: 1.3.8a paypal ipn

We are having this same problem, however, we've checked and double checked our PayPal settings, and everything is correct. PayPal was working fine on the 1.3.6 version of the site, but now with 1.3.8a, the info isn't being passed back to the cart.

One thing I'm worried about is the new version of PayPal in the admin says this:

*PHP allow_url_fopen must be enabled

I believe our host blocks this function, for security reasons. Is this change new to the 1.3.8 version of PayPal? If so, this is likely our problem.

Does PayPal Express use allow_url_fopen, or can we switch to this as a solution?

Thanks!

18 Jan 2008, 4:21 AM
#5
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: 1.3.8a paypal ipn

aeolidia:

We are having this same problem, however, we've checked and double checked our PayPal settings, and everything is correct. PayPal was working fine on the 1.3.6 version of the site, but now with 1.3.8a, the info isn't being passed back to the cart.

One thing I'm worried about is the new version of PayPal in the admin says this:

*PHP allow_url_fopen must be enabled

I believe our host blocks this function, for security reasons. Is this change new to the 1.3.8 version of PayPal? If so, this is likely our problem.

Does PayPal Express use allow_url_fopen, or can we switch to this as a solution?

Thanks!
Three options

  1. Rewrite the allow_url_fopen part in CURL
  2. Find host which allows allow_url_fopen
  3. Not sure but you can try overriding the allow_url_fopen value by using custom php.ini
    http://www.zen-cart.com/forum/showthread.php?t=73405

Let us know if any of these helps

Tutorials on Zen Cart
http://tutorials.zen-cart.com/index.php

advanced.programmer at gmail dot com
In love with Zen Cart!!

26 Jan 2008, 7:39 PM
#6
aeolidia avatar

aeolidia

Zen Follower

Join Date:
Mar 2005
Posts:
166
Plugin Contributions:
0

Re: 1.3.8a paypal ipn

#1 would be great, but I'm not a programmer, so that's out!

#2 doesn't work so well for me, because most of my clients are on the same host, and I can't tell them all they have to move.

#3 I'd appreciate more info on.

I guess I'm off to the Commercial Help Wanted forum, unless anyone else has some insight about this!

26 Jan 2008, 10:28 PM
#7
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: 1.3.8a paypal ipn

You should confirm some information before hiring anyone. Could be the problem, if there is one, can be corrected on your own.

Admin > Tools > Server/Version Info

Can you tell us what the settings are for: Server API & allow_url_fopen?
Use your Browser 'Search' feature to easily find them.

The learning is in the doing.

Potent Products

26 Jan 2008, 11:27 PM
#8
absolute avatar

absolute

Totally Zenned

Join Date:
May 2005
Location:
Bath, Somerset
Posts:
1,054
Plugin Contributions:
2

Re: 1.3.8a paypal ipn

Forgive me for asking, but is allow_url_fopen not used with the fopen function? I was under the impression this dunction was only used locally for storing debug files, rather than communicating with the PayPal server. It may just be a simple case of turning off the debugging and running tests again.

Just a thought before anyone spends time trying to re-write CURL functions.

Absolute

Back, after a 4 year absence! Did you miss me?
Absolute Web Solutions Ltd
Interested in our work? Take a look at one of our sites - The Tech Store

27 Jan 2008, 1:05 AM
#9
sandykr09 avatar

sandykr09

New Zenner

Join Date:
Oct 2007
Posts:
38
Plugin Contributions:
0

Re: 1.3.8a paypal ipn

Anyone help with this?
I have also had problems with getting an order to show up in my website e-mail to show what the customer ordered. I believe at this point it was because their server was not communicating with host server which from what I read was a url issue.
I have keyed in for my url:
For IPN - https://www.bubbleshirtsetc.com/ipn_main_handler.php

For website payment pref - https://www.bubbleshirts.com/index.php?main_page=checkout_process

Is this not keyed in correctly? the www.bubb..etc is my website and so on.
Hopefully someone can tell me whether this does not look right. I have been trying to get this configured correctly for hours and I cannot get a prompt that I have a new order!!!
Totally confused and frustrated.
Sandy:frusty:

27 Jan 2008, 3:23 AM
#10
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: 1.3.8a paypal ipn

You can use Sandbox mode.

You can turn Debug mode, have an eMail sent to yourself with detais of what transpired.

The learning is in the doing.

Potent Products

5 Feb 2008, 5:51 AM
#11
aeolidia avatar

aeolidia

Zen Follower

Join Date:
Mar 2005
Posts:
166
Plugin Contributions:
0

Re: 1.3.8a paypal ipn

Website Rob,

Server API: CGI
allow_url_fopen: Local value: Off Master value: Off

We made the upgrade on the live site (agh!), and then "downgraded" immediately after we saw it wasn't working, so I can't currently do any tests, though if you think it's worth my while, I can re-upgrade in a separate directory and try the sandbox and debug modes (though I'm not sure PayPal settings will work correctly in a subdirectory, will they? Since the URLs won't match with what we've set PayPal up with).

5 Feb 2008, 6:26 AM
#12
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: 1.3.8a paypal ipn

If a 3rd party requires a certain function/feature and your Hosting account cannot provide it, you cannot use that 3rd party.

Nothing "you" can do, to alter the situation. For whatever reason your Hoster has 'allow_url_fopen' turned OFF and you probably cannot change that. You could contact your Hoster, explain the situation and ask how it can be enabled for your site.

Not sure why your Hoster would turn that OFF as it's used by many scripts and in perfect safety -- when the Server is properly secured that is. No doubt you are not the only one with that Hoster running into problems because of it. Check their Forums, if they have one, see who else is mentioning it.

The learning is in the doing.

Potent Products

5 Feb 2008, 6:47 AM
#13
aeolidia avatar

aeolidia

Zen Follower

Join Date:
Mar 2005
Posts:
166
Plugin Contributions:
0

Re: 1.3.8a paypal ipn

Yep, we've already talked to our host, and got this info:

For security reasons, it is best to avoid using url_fopen
http://wiki.dreamhost.com/Allow_url_fopen

It is much better that you use cURL as an alternative:
http://wiki.dreamhost.com/CURL

Because of the aforementioned security risk, if it is mandatory that you be able to use it you must install you own instance of PHP locally.

I don't want to install PHP myself for all of my clients, so I'd prefer not to do this.

However, it was suggested earlier in this thread:

I was under the impression this dunction was only used locally for storing debug files, rather than communicating with the PayPal server. It may just be a simple case of turning off the debugging and running tests again.

I have reinstalled the upgrade in a subdirectory and PayPal debug is set to log.

I'm returned to the testing site with no order number (same problem as before). Here is the result in the log file created (site info removed for client's privacy). Does any of this help?

Feb 04 2008 22:43 -- Keys for submission: Array
(
[charset] => iso-8859-1
[lc] => US
[page_style] => Primary
[custom] => zenid=75ad020fdbea4597dfd36de19adc6a1b
[business] => [email protected]
[return] => http://shop.xxxxxx.com/STAGING/index.php?main_page=checkout_process&referer=paypal
[cancel_return] => http://shop.xxxxxx.com/STAGING/index.php?main_page=checkout_payment
[shopping_url] => http://shop.xxxxxx.com/STAGING/index.php?main_page=shopping_cart
[notify_url] => http://shop.xxxxxx.com/STAGING/ipn_main_handler.php
[redirect_cmd] => _xclick
[rm] => 2
[bn] => zencart
[mrb] => R-6C7952342H795591R
[pal] => 9E82WJBKKGPLQ
[first_name] => John
[last_name] => Doe
[address1] => 123 N. Fake St.
[city] => Seattle
[state] => WA
[zip] => 98103
[country] => US
[email] => [email protected]
[H_PhoneNumber] => 2065555555
[night_phone_a] => 206
[night_phone_b] => 555
[night_phone_c] => 5555
[day_phone_a] => 206
[day_phone_b] => 555
[day_phone_c] => 5555
[no_shipping] => 1
[upload] => 1
[currency_code] => USD
[cmd] => _ext-enter
[item_name] => xxxxxx.com Purchase
[item_number] => Store Receipt
[amount] => 0.01
[shipping] => 0.00
[tax] => 0.00
[tax_cart] => 0.00
)

5 Feb 2008, 7:53 AM
#14
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: 1.3.8a paypal ipn

Your output looks fine.

One thing I'm worried about is the new version of PayPal in the admin says this:

*PHP allow_url_fopen must be enabled

I was not able to find mention of 'url_fopen' anywhere on the PayPal site. This includes checking their knowledge base as well. Presuming your Host has cURL setup & running properly, it sounds like your problem is just a matter of your settings within Zen Cart.

The learning is in the doing.

Potent Products

5 Feb 2008, 6:56 PM
#15
aeolidia avatar

aeolidia

Zen Follower

Join Date:
Mar 2005
Posts:
166
Plugin Contributions:
0

Re: 1.3.8a paypal ipn

The quote above about allow_url_fopen is from the requirements for the PayPal IPN module in the Zen Cart admin - presumably the way this works has changed between the 1.3.7 version and the 1.3.8 version.

Could anyone who worked on this change for Zen Cart 1.3.8 pitch in with a little advice? There aren't many settings to change. Would it help, or is it now required, to set up the PDT/Payment Data Transfer for PayPal?

5 Feb 2008, 8:13 PM
#16
absolute avatar

absolute

Totally Zenned

Join Date:
May 2005
Location:
Bath, Somerset
Posts:
1,054
Plugin Contributions:
2

Re: 1.3.8a paypal ipn

Absolute:

Forgive me for asking, but is allow_url_fopen not used with the fopen function? I was under the impression this function was only used locally for storing debug files, rather than communicating with the PayPal server. It may just be a simple case of turning off the debugging and running tests again.

Just a thought before anyone spends time trying to re-write CURL functions.

Absolute

Um, just a thought, but have you consiered my post above? I have created a number of payment modules, and re-written the PayPal module for a couple of clients, and I've never come across this problem.

Absolute

Back, after a 4 year absence! Did you miss me?
Absolute Web Solutions Ltd
Interested in our work? Take a look at one of our sites - The Tech Store

5 Feb 2008, 11:37 PM
#17
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Location:
Herts. UK
Posts:
893
Plugin Contributions:
0

Re: 1.3.8a paypal ipn

aeolidia:

The quote above about allow_url_fopen is from the requirements for the PayPal IPN module in the Zen Cart admin - presumably the way this works has changed between the 1.3.7 version and the 1.3.8 version.
I've posted a question about this in an another thread. Hopefully one of the Dev Team can shed some light on it. I've looked through the ZC 1.3.8 PayPal IPN code and as far as I can tell the setting of allow_url_fopen should not make any difference. There is nothing in the code that relies on it for normal operation.

Regards,
Christian.

6 Feb 2008, 7:39 AM
#18
aeolidia avatar

aeolidia

Zen Follower

Join Date:
Mar 2005
Posts:
166
Plugin Contributions:
0

Re: 1.3.8a paypal ipn

Hi Absolute,

I've tested PayPal payments with debugging both on and off and I get no info back to Zen Cart in either case. If this wasn't what you meant, I'd appreciate any clarification.

PayPal was working fine on this site on version 1.3.7, I upgraded to 1.3.8, and now no info goes back and forth between PayPal and Zen Cart. Yes, I did remove the module and reinstall it after upgrading.

The only change I see in the admin between the two versions is the sudden inclusion of url_fopen as being a requirement, so that's what I'm considering as the prime suspect, but it's certainly possible I'm having another problem. I just don't know how to test it out at this point.

I do have the 1.3.8 site back up on a test server, though, and would love to try making any changes anyone thinks may help. I'm out of ideas! Thanks in advance.

6 Feb 2008, 10:34 AM
#19
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: 1.3.8a paypal ipn

In doing some comparison to your output and what is stated in Zen Cart, I see this difference.

Your output:
[return] => http://shop.xxxxxx.com/STAGING/index...referer=paypal

Zen Cart says it should be:
in Website Payments Preferences set your Automatic Return URL to:
http://shop.xxxxxx.com/STAGING/index.php?main_page=checkout_process

You should check to make sure your Return Page is correct.

The learning is in the doing.

Potent Products

6 Feb 2008, 8:22 PM
#20
aeolidia avatar

aeolidia

Zen Follower

Join Date:
Mar 2005
Posts:
166
Plugin Contributions:
0

Re: 1.3.8a paypal ipn

I really appreciate everyone who's taking the time to look into this with me. Getting this solved will allow me to upgrade all my current clients and continue to use Zen Cart for new clients!

The return URL set through PayPal is /index.php?main_page=checkout_process, but it looks like what comes through in the log is index.php?main_page=checkout_process&referer=paypal - this is nothing we set up, but looks like something PayPal is appending to the URL.

Is this not what's supposed to happen? Do I have any control over this?

We have checked and double checked the settings in the PayPal account, and they're correct (and currently working perfectly on the live 1.3.7 site).