Forums / Addon Payment Modules / Bambora Payform - Session expired after some payments instead of checkout_success

Bambora Payform - Session expired after some payments instead of checkout_success

Views: 10,358

Results 21 to 23 of 23
20 May 2021, 3:52 PM
#21
riomaha avatar

riomaha

New Zenner

Join Date:
Oct 2013
Location:
MTL
Posts:
66
Plugin Contributions:
1

Bambora Payform - Session expired after some payments instead of checkout_success

Thank you that did resolve the issue. I guess creating the file /includes/extra_configures/samesite_cookie.php will make it apply to the entire site vs having the code in init_session.php (I guess this applies to session creation only)

$samesite = (defined('COOKIE_SAMESITE')) ? COOKIE_SAMESITE : 'lax';
if (!in_array($samesite, ['lax', 'strict', 'none'])) $samesite = 'lax';
18 Mar 2024, 3:45 PM
#22
zamzom avatar

zamzom

New Zenner

Join Date:
Jun 2009
Location:
Europe
Posts:
60
Plugin Contributions:
0

Re: Bambora Payform - Session expired after some payments instead of checkout_success

Thank you for this crutial info,
Additionally, at the current state of Chrome browser SameSite=none; also causes error.
You can not even log in to the site, it automatically logs you out.
In the page error report it says Secure connection is obligatory if SameSite=none choosen.
So the below definition by DrByte should be changed as follows:

define('COOKIE_SAMESITE', 'none; secure');

Thanks also to Scott C Wilson for putting this on Zen-Cart documentation
https://docs.zen-cart.com/user/payment/payment_whoops_timeouts/

If somebody could also update that it could save somebody sometime...

DrByte:

You can probably resolve it with this instead:

Create a file named /includes/extra_configures/samesite_cookie.php containing the following:

<?php // ----- // Samesite cookie needs to be 'none' when doing offsite payment gateway redirects // define('COOKIE_SAMESITE', 'none'); ```
7 Feb 2025, 5:54 PM
#23
zamzom avatar

zamzom

New Zenner

Join Date:
Jun 2009
Location:
Europe
Posts:
60
Plugin Contributions:
0

Re: Bambora Payform - Session expired after some payments instead of checkout_success

zamzom:

Thank you for this crutial info,
Additionally, at the current state of Chrome browser SameSite=none; also causes error.
You can not even log in to the site, it automatically logs you out.
In the page error report it says Secure connection is obligatory if SameSite=none choosen.
So the below definition by DrByte should be changed as follows:

define('COOKIE_SAMESITE', 'none; secure');


Please forget the previous suggestion.  init_sessions.php searches for exact phrase 'none', if you change it, it won't work.
Page encoding should be https though, otherwise samesite 'none' will create an error.