Product store — QA plan
Automated: apps/api/src/products/product-store.int.spec.ts, apps/api/src/sms/**/*.unit.spec.ts, apps/api/src/analytics/analytics-reports.int.spec.ts (revenue by source), apps/web/src/components/products/*.int.spec.tsx, apps/web/src/app/[lang]/p|r|pay/**/*.int.spec.tsx.
Manual (staging, Cardcom test terminal)
| # | Scenario | Expected |
|---|---|---|
| M1 | Lite org opens Store | Upgrade card. |
| M2 | Pro org, no provider | Alert “connect a payment provider”; New product disabled. |
| M3 | Create product with image | Card shows image, price; link dialog opens with QR. |
| M4 | Download and print QR | PNG downloads; print view shows QR, name, price. |
| M5 | Scan QR on a phone (signed out) | Product page; name/phone empty. |
| M6 | Pay with quantity 2 | Cardcom page shows 2 × price; after paying, /pay/result shows “View your receipt”. |
| M7 | Webhook arrives | Sale Paid; document number on the transaction; receipt sent (WhatsApp or SMS) with a working /r/… link. |
| M8 | Buyer phone = a member’s phone | Sale linked “Phone match”; appears on the member’s payments tab. |
| M9 | Signed-in member buys | Name/phone pre-filled; sale linked “Signed in”. |
| M10 | Record a cash sale at the desk | Sale Paid, method cash, document issued. |
| M11 | Refund a card sale | Cardcom refund; status Refunded; revenue report store row nets to zero. |
| M12 | Refund a cash sale | Credit-note dialog; status Refunded. |
| M13 | Archive product, scan QR | ”Not available”. Restore → page works again with the same QR. |
| M14 | Change price | Next checkout uses the new price; earlier sales keep theirs. |
| M15 | Reports → Revenue sources | Store and “Plans and other” add up to the totals. |
| M16 | SMS on, sender not approved at Micropay | receipt_error starts with sms_rejected; staff resend after approval works. |