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.