The Prompt BakeryTemplates and prompts

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)

  1. 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

  1. Find the return route and what it needs (cookies, tokens, headers).
  2. 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.
  3. 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.

Related

Try another entry

How can we help?

What do you need?
Your email, so we can reply (optional)Only enter your own email. We reply there.