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:
@@ -67,7 +67,7 @@ export default function Checkout() {
|
||||
|
||||
if (order?.payment_status === "paid") {
|
||||
toast({ title: "Pembayaran berhasil!", description: "Akses produk sudah aktif" });
|
||||
navigate("/access");
|
||||
navigate(`/orders/${oid}`);
|
||||
} else {
|
||||
toast({ title: "Pembayaran pending", description: "Menunggu konfirmasi pembayaran" });
|
||||
}
|
||||
@@ -196,7 +196,7 @@ export default function Checkout() {
|
||||
|
||||
if (order?.payment_status === "paid") {
|
||||
toast({ title: "Pembayaran berhasil!", description: "Akses produk sudah aktif" });
|
||||
navigate("/access");
|
||||
navigate(`/orders/${orderId}`);
|
||||
} else {
|
||||
toast({ title: "Belum ada pembayaran", description: "Silakan selesaikan pembayaran" });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user