feat(avatar): route token recharge through Huihui org orders

This commit is contained in:
stefanfeng
2026-10-16 14:56:00 +08:00
parent 9566eb8925
commit b1bf203018
9 changed files with 171 additions and 67 deletions
+8 -1
View File
@@ -156,7 +156,8 @@ export interface TokenPaymentOrder {
pointsAmount: number
price: number
status: 'pending' | 'paid' | 'failed' | 'closed' | 'refunded'
provider: 'huihui' | 'wechat_virtual'
provider: 'huihui' | 'wechat_virtual' | 'huihui_org'
providerOrderNo?: string
providerStatus: string
payMessage: string
failureReason: string
@@ -196,6 +197,12 @@ export const chargeToken = (
payScene: 'APP' | 'H5' | 'LITE' | 'JSAPI'
) => request.post<TokenPaymentOrder>('/token/charge', { planId, paymentMethod, payScene })
export const chargeTokenOrg = (
planId: string,
paymentMethod: 'wechat' | 'alipay',
payScene: 'APP' | 'H5' | 'LITE' | 'JSAPI'
) => request.post<TokenPaymentOrder>('/token/charge/org', { planId, paymentMethod, payScene })
export const getTokenPaymentStatus = (orderId: string) =>
request.get<TokenPaymentOrder>(`/token/payment/${orderId}`)