修复支付取消的调用和规定时间内更新订单支付状态

This commit is contained in:
Eamon-meng
2025-08-16 11:41:07 +08:00
parent 1baa7c94dc
commit 99c3b9914e
7 changed files with 105 additions and 98 deletions

View File

@@ -91,7 +91,7 @@ export default function RechargeModal(props: RechargeModelProps) {
}
}
const handlePaymentSuccess = async () => {
const handlePaymentSuccess = async (showFail: boolean) => {
if (!trade) return
try {
const resp = await RechargeComplete({
@@ -110,7 +110,9 @@ export default function RechargeModal(props: RechargeModelProps) {
await refreshProfile()
}
catch (e) {
toast.error('支付验证失败', {description: (e as Error).message})
if (showFail) {
toast.error('支付验证失败', {description: (e as Error).message})
}
}
}