Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

apokall's avatar

Why another site kill my session?

Hello. Faced a country problem. I made a payment, everything went well, from my site I received an url from the payment system, tossed a page using js to checkout, entered data on the card, after which there was a callback and a redirect from this page back to my site, but with a redirect my session was erased. From all open tabs, I was logged out accordingly, because authentication works through a session. Question: How can a redirect from a payment site delete a session? Hello. Faced a country problem. I made a payment, everything went well, from my site I received an url from the payment system, tossed a page using js to checkout, entered data on the card, after which there was a callback and a redirect from this page back to my site, but with a redirect my session was erased. From all open tabs, I was logged out accordingly, because authentication works through a session. Question: How can a redirect from a payment site delete a session? How can I avoid this? After all, I need the user to get back to their account, authenticated.

0 likes
1 reply

Please or to participate in this conversation.