0

We have an online shop and recently found an issue: quite often the session is lost after redirecting from the payment gateway after a successful transaction.

The shop is running on example.com and the gateway on gateway.com.

When we access POST example.com/order this creates an payment url on the gateway and is going to redirect there.

After the payment is done, when coming back to the example.com/thank-you, the cookie header does not have the connect.sid anymore, hence the session is not set anymore.

I am trying to figure out why the cookie would not be set because everything works fine except for when we access the payment gateway.

I tried to do res.json({ url: paymentUrl }) and access the url manually. It has exactly the same issue.

What could cause example.com to lose the connect.sid cookie after the redirect from the payment gateway?

We use PayTabs as payment processing provider.

Ionică Bizău
  • 109,027
  • 88
  • 289
  • 474
  • I am having a same issue with node express after successfully payment return i lost all session stored. Did you resolved this already? – Kashyap Patel Mar 03 '21 at 11:46
  • @KashyapPatel I solved it by passing the session id in the return url, and requerying the session by that. I am afraid it's a bug in Chrome, even though I am not sure... – Ionică Bizău Mar 03 '21 at 15:09

0 Answers0