fix(payment): include RECHARGING in result page success states

The PaymentResultView only checked COMPLETED and PAID status, but orders
in RECHARGING state (balance being applied after payment) were incorrectly
shown as failed.
This commit is contained in:
erio committed 2026-04-10 16:23:23 +08:00
1 parent 0113bf60fd
commit 7547ea9f4e
2 files changed
+4 -2

No files matched your search

+1 -1
View File
@@ -1 +1 @@
0.1.108.150
0.1.108.151
@@ -102,10 +102,12 @@ interface ReturnInfo {
}
const returnInfo = ref<ReturnInfo | null>(null)
const SUCCESS_STATUSES = new Set(['COMPLETED', 'PAID', 'RECHARGING'])
const isSuccess = computed(() => {
// Always prioritize actual order status from backend
if (order.value) {
return order.value.status === 'COMPLETED' || order.value.status === 'PAID'
return SUCCESS_STATUSES.has(order.value.status)
}
// Fallback only when order not loaded
if (route.query.status === 'success') return true