Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal App - PayPal Standard IPN


trier

Recommended Posts

Hi, Minor issue -  if ‘Force Cookies Use’ is set to true in admin>configuration>sessions it causes a PHP error in the new PayPal App module    ext/modules/payment/paypal/standard_ipn.php.

 

A statement near the end of the module - tep_session_destroy(); returns an error “Trying to destroy uninitialized session“.

 

A possible reason for this may be because when ‘Force Cookies Use’ is true, a session isn’t actually started until the second pass through application_top.php (a cookie is set in the first pass, when its presence confirmed in subsequent passes a session is started (I think????)).

 

The error is probably of no great consequence, however, the statement is presumably there for a reason so should be actioned. There is no reason/excuse for any error to be acceptable, errors can mask other failings.

 

For the moment, after the include application_top in standard_ipn I have added -     if(!isset($_SESSION)) {tep_session_start();}

 

Equally 

    if (SESSION_FORCE_COOKIE_USE == 'True') {tep_session_start();} could be used? 

    the tep_session_destroy(); could be removed (but I think it also (correctly?) destroys the cookie)?

 

Each of these options seem quite reasonable, but I don’t really know if there may be any hidden side affect?

 

Are there any opinions/preferences/alternatives (please don’t suggest the obvious “remove Force Cookies Use’” – opinion seems to be equally divided on the “must have/must not have”, I prefer the former).

Link to comment
Share on other sites

  • 5 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...