Double-check unpaid orders and let shoppers complete their payment
- Every 5 minutes, ask Stripe or HitPay about unpaid orders whose payment news may have been missed, and mark them paid
- After 25 hours with no payment, the order becomes "Not paid" and is left alone
- Both payment pages now close 23 hours after the order, and that deadline is shown to shoppers
- Order page: "Complete payment" button with the deadline; "Payment time is over" after it
- Cart page: banner for the shopper's own unpaid order (same browser only)
- One "Complete your payment" email about 30 minutes after an unpaid order, in English or Malay; not sent if they paid, ordered again, the provider could not be checked, or under an hour is left
- Every "Complete payment" link asks the provider first, so a paid or expired order goes to the order page
- Merchant order page: notes for orders waiting for payment and for "Not paid" orders
- New columns on orders: payment_checked_at, payment_url, payment_expires_at, payment_reminded_at (run php artisan migrate)
Add GrabPay, and DuitNow QR and e-wallets through HitPay
- GrabPay is switched on for every merchant's own Stripe account, like FPX; stores set up earlier get it on their next check
- Merchants can connect their own HitPay account in Settings with their API key (checked with HitPay, stored encrypted) and choose DuitNow QR, Touch 'n Go and ShopeePay
- At checkout, shoppers choose Stripe (card, FPX, GrabPay) or HitPay (DuitNow QR, e-wallets); a store with only HitPay can take orders too
- HitPay orders are marked paid only after asking HitPay directly, on the return page and from HitPay's webhook
- Methods HitPay refuses are left out for an hour, the shopper pays with what is left, and the merchant sees a warning in Settings
- The HitPay key is kept out of error logs
- HITPAY_SANDBOX setting; run php artisan migrate (grabpay_requested, hitpay_accounts)