feat(avatar): route token recharge through Huihui org orders
This commit is contained in:
@@ -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}`)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user