fix: restore wechat payment oauth and jsapi flow

This commit is contained in:
IanShaw027
2026-04-20 23:34:57 +08:00
parent 6f00efa350
commit 7ef7fd19e7
16 changed files with 1563 additions and 87 deletions

View File

@@ -156,6 +156,28 @@ export interface CreateOrderRequest {
plan_id?: number
return_url?: string
payment_source?: string
openid?: string
is_mobile?: boolean
}
export type CreateOrderResultType = 'order_created' | 'oauth_required' | 'jsapi_ready'
export interface WechatOAuthInfo {
authorize_url?: string
appid?: string
openid?: string
scope?: string
state?: string
redirect_url?: string
}
export interface WechatJSAPIPayload {
appId?: string
timeStamp?: string
nonceStr?: string
package?: string
signType?: string
paySign?: string
}
export interface CreateOrderResult {
@@ -167,8 +189,14 @@ export interface CreateOrderResult {
pay_amount: number
fee_rate: number
expires_at: string
result_type?: CreateOrderResultType
payment_type?: string
out_trade_no?: string
payment_mode?: string
resume_token?: string
oauth?: WechatOAuthInfo
jsapi?: WechatJSAPIPayload
jsapi_payload?: WechatJSAPIPayload
}
export interface DashboardStats {