Description
After a ticket purchase creates an order, the backend returns { destinationAddress, memo, amountXLM }. There is no frontend UI for this Stellar payment flow — users have no idea what to do after clicking "Purchase".
What to do
Create src/features/orders/components/StellarPaymentInstructions.tsx:
- Destination address: display truncated + full on hover, one-click copy button
- Memo: displayed in red with a prominent warning — "Required — your payment will fail without the memo"
- Amount: XLM amount with copy button
- QR code: generate a
web+stellar:pay?destination=G...&amount=X&memo=Y QR code using qrcode.react
- Countdown timer: shows time remaining before order expires (default 15 minutes)
- Auto-confirm: poll
GET /api/orders/:id every 5 seconds — when status === "PAID", redirect to /tickets with a success toast "🎉 Tickets issued! Check your email."
- Expiry: when countdown hits 0 show an expired state with a "Retry Payment" button calling
POST /api/orders/:id/retry-payment
Files touched
src/features/orders/components/StellarPaymentInstructions.tsx (new)
src/hooks/useOrderStatus.ts (new — polling hook)
package.json (add qrcode.react)
PR requirement
Closes #[issue_id] — Timeframe: 72 hours
Description
After a ticket purchase creates an order, the backend returns
{ destinationAddress, memo, amountXLM }. There is no frontend UI for this Stellar payment flow — users have no idea what to do after clicking "Purchase".What to do
Create
src/features/orders/components/StellarPaymentInstructions.tsx:web+stellar:pay?destination=G...&amount=X&memo=YQR code usingqrcode.reactGET /api/orders/:idevery 5 seconds — whenstatus === "PAID", redirect to/ticketswith a success toast "🎉 Tickets issued! Check your email."POST /api/orders/:id/retry-paymentFiles touched
src/features/orders/components/StellarPaymentInstructions.tsx(new)src/hooks/useOrderStatus.ts(new — polling hook)package.json(addqrcode.react)PR requirement
Closes #[issue_id]— Timeframe: 72 hours