Checkout has to upsell without slowing the counter queue, handle sold-out lines, and move payment into WeChat's trusted cashier — not a custom card form.
Upsell, review, then hand off to WeChat Pay
Combo upsells and cart review finish in the WeChat Pay password sheet — merchant order first, cashier second.
Upsell in the combo
Combo modal with drink add-ons before the cart.
Implementation narrative
Combo modals offer drink upsells before add-to-cart. The cart reviews line items, sold-out rows, suggested adds, discounts, and a green WeChat Pay CTA. Tapping pay opens the platform password confirmation sheet.
Checkout ends in the WeChat Pay cashier. The merchant backend creates a JSAPI / Mini Program order and returns a short-lived `prepay_id`; the client calls `wx.requestPayment` with RSA-signed parameters (payment flow, invoke payment). Final paid state must come from the payment notification or order query — not only the client success callback. Representative pattern from the official docs (not recovered Dodo source; screenshot amounts are UI sample data):
const payment = await createPayment(orderId)
await wx.requestPayment({
timeStamp: payment.timeStamp,
nonceStr: payment.nonceStr,
package: `prepay_id=${payment.prepayId}`,
signType: 'RSA',
paySign: payment.paySign,
})
const confirmedOrder = await fetchOrder(orderId)- Upsell in the combo: Combo modal with drink add-ons before the cart.
- Review the cart: Line items, sold-out handling, suggested adds, and WeChat Pay CTA.
- WeChat Pay confirmation: Platform password sheet confirms payment; amounts in UI are sample data.


