dataleim Posted November 13, 2022 Share Posted November 13, 2022 Hello, My prestashop empties the cart and also logs out or deletes the customer data if buying as a guest when a payment error occurs or if the user cancels the payment. The normal behaviour should be to keep the cart and the session with the customer data to try again or with another payment method. This happens with Credit Card, with different modules from different companies, so it may not be the module, and there is also similar behaviour with Amazon Pay. In the end the result is an error, an empty cart, and the hassle for the buyer of having to re-enter their details. Do you know where I can start investigating this to find out what's wrong with my prestashop installation? Thanks Link to comment Share on other sites More sharing options...
El Patron Posted November 22, 2022 Share Posted November 22, 2022 for a dev, and they can reproduce should be able to solve given they have access to debug. I recommend 1) turning off guest checkout until solved and 2) posting in job sections to find (and build relationship) with a competent developer/tech. Link to comment Share on other sites More sharing options...
Janett Posted November 23, 2022 Share Posted November 23, 2022 This issue is mainly due to SameSite directive of the PrestaShop Cookie. When payment is done on an external page, on redirect to PrestaShop you are considered like coming from a third party so the Cookie is not read. More info on https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite Since PrestaShop 1.7.8.0, there a new setting on BO > Advanced Parameters > Administration > Cookie SameSite should be set to None. Before PrestaShop 1.7.8.0, only way to fix it is to add a line into .htaccess file at root of PrestaShop files. Header always edit Set-Cookie (.*) "$1; SameSite=None; Secure" For this reason, many modern payment gateways avoid to redirect customer to an external page bu using javascript component like Hosted Fields or iframe for card payment directly on your own checkout page. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now