A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
Hi Jamessimm,
Thanks for sharing your setup and the challenges you’re facing. You’re dealing with a pretty typical asynchronous-payment scenario, and I think the approach you’ve taken is sound. Below are some thoughts, confirmations of what works, and a few suggestions to strengthen the flow and avoid edge-cases.
So far - this matches recommended practices for asynchronous payment flows + external gateway + webhooks.
Recommended enhancements & safeguards:
PaymentPending = true flag, prevent further changes to line items or shipping after payment call)Wait for webhook.
On success → convert cart to order, unlock order, send downstream events.
On failure or timeout → revert cart lock, notify user, allow retry or alternative payment.
Hope this will helps you!
Thanks,
Hi Sunil,
Thanks for the reply, this was posted a while ago and we've solved the issues since then.
We ended up with a flow that:
A lot of your suggestions are exactly what we implemented, so good to have that validated.
Thanks.
Great to hear that, and thanks for the update!
Your final flow sounds solid - converting the cart to an order in a “pending” state is a reliable pattern, and handling both webhook outcomes (success/failure) via state transitions is exactly how most async-payment platforms operate.
Glad to know the suggestions aligned with what you implemented.
Sorry for the long post, but got a "fun" problem to solve:
Our client uses CMS 12 / Commerce Connect 14 + Adyen payments (via the drop-in component).
As it stands:
The original problem:
Work done so far:
The problem I need to solve is:
Been researching this and everything seems to be geared towards a "synchronous" payment flow where you know the payment succeeded before placing the order.
Has anyone dealt with anything like the above?