Fix · Payments
After paying, the customer comes back logged out or with an empty cart
Blocks your workNot checked against the vendor's current screens
What you may see
- The return page shows an error or asks me to log in again
- It breaks only when the gateway sends the customer back with a form post
Most likely cause
The return from another website can drop strict cookies, or a protection rule (CORS, CSRF) blocks the gateway's request to your return address.
Check first (about two minutes)
- Is the return a normal link (GET) or a form post from the gateway? Look at the Network tab.
The fix prompt
What you type here never leaves your browser. The search runs on this page, and nothing is sent to a server or to an AI.
Kept only in this browser, on this device. Keys and passwords are removed before anything is saved.
Prompt language
Paste it into Claude, ChatGPT, Gemini or Cursor, then follow what it says.
After you tried it, did it work?
Steps
- Find the return route and what it needs (cookies, tokens, headers).
- Make the return page identify the order by the payment reference in the address, then verify the payment with the gateway on the server; do not depend on the visitor's session.
- Use lax cookies for the session so a normal link return keeps the login, and exempt only this one route from CSRF checks (not from verification).
Do not do this
- Do not show order details to anyone who guesses an order number.
- Do not turn off CSRF protection site-wide.