- Remove PayPal payment option from checkout - Add qr_string and qr_expires_at columns to orders table - Update create-payment to store QR string in database - Update pakasir-webhook to clear QR string after payment - Simplify Checkout to redirect to order detail page - Clean up unused imports and components Flow: 1. User checks out with QRIS (only option) 2. Order created with payment_method='qris' 3. QR string stored in database 4. User redirected to Order Detail page 5. QR code displayed in-app with polling 6. After payment, QR string cleared, access granted 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
20 lines
952 B
SQL
20 lines
952 B
SQL
-- ============================================================================
|
|
-- Add QR String Support to Orders
|
|
-- ============================================================================
|
|
-- Stores QRIS string and expiry for in-app QR code display
|
|
-- Eliminates need to redirect to external payment page
|
|
-- ============================================================================
|
|
|
|
-- Add columns for QRIS payment data
|
|
ALTER TABLE orders
|
|
ADD COLUMN IF NOT EXISTS qr_string TEXT,
|
|
ADD COLUMN IF NOT EXISTS qr_expires_at TIMESTAMPTZ;
|
|
|
|
-- Add index for cleanup of expired QR codes
|
|
CREATE INDEX IF NOT EXISTS idx_orders_qr_expires_at ON orders(qr_expires_at)
|
|
WHERE qr_expires_at IS NOT NULL;
|
|
|
|
-- Add comment
|
|
COMMENT ON COLUMN orders.qr_string IS 'QRIS payment string for generating QR code in-app. Cleared after payment or expiration.';
|
|
COMMENT ON COLUMN orders.qr_expires_at IS 'QRIS code expiration timestamp. Used for cleanup and validation.';
|