Fix checkout flow to redirect to specific order detail page

🔄 Better UX Flow:
- After successful payment: redirect to /orders/{order_id} instead of /access
- This shows the specific order details where users can see their purchase
- Users can then proceed to payment if needed or access their content

📧 Updated Shortcodes:
- {thank_you_page} now uses dynamic URL pattern: /orders/{order_id}
- {order_id} will be replaced with actual order ID by ShortcodeProcessor
- Added {thank_you_page} to order_created and payment_reminder templates

🎯 User Journey:
1. User receives email with payment link
2. After successful payment → redirected to specific order detail page
3. If not logged in → redirects to login, then back to order detail
4. Order detail page shows payment status and access information

Much better user experience than generic dashboard redirect!

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
dwindown
2025-12-22 22:40:08 +07:00
parent 7fbc7c1302
commit f1cc2ba3f7
3 changed files with 5 additions and 5 deletions

View File

@@ -407,7 +407,7 @@ export class ShortcodeProcessor {
jumlah_pembayaran: 'Rp 1.500.000',
batas_pembayaran: '22 Desember 2025 23:59',
payment_link: 'https://accesshub.example.com/checkout',
thank_you_page: 'https://accesshub.example.com/access'
thank_you_page: 'https://accesshub.example.com/orders/{order_id}'
};
static process(content: string, customData: Record<string, string> = {}): string {