mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-12 22:20:19 +08:00
fix(billing): 复用待支付套餐订单
This commit is contained in:
@@ -126,6 +126,7 @@ export interface BillingCheckoutResponse {
|
||||
product?: BillingPlan | null
|
||||
}
|
||||
payment_instructions: Record<string, unknown>
|
||||
reused_pending_order?: boolean
|
||||
}
|
||||
|
||||
export interface UserPlanEntitlement {
|
||||
|
||||
@@ -351,7 +351,11 @@ async function checkoutPlan(plan: BillingPlan) {
|
||||
payment_channel: option.payment_channel,
|
||||
})
|
||||
latestCheckout.value = response
|
||||
success('套餐订单已创建')
|
||||
success(
|
||||
response.reused_pending_order
|
||||
? '已有待支付订单,已打开原支付链接'
|
||||
: '套餐订单已创建'
|
||||
)
|
||||
submitPaymentInstructions(response.payment_instructions)
|
||||
} catch (err) {
|
||||
log.error('创建套餐订单失败:', err)
|
||||
|
||||
Reference in New Issue
Block a user