Add WeChat in-app JSAPI recharge for g2.tkmind.cn.

Use JSAPI with bound openid inside WeChat instead of QR long-press, and include related auth redirect and admin UX fixes.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-06-16 16:20:04 +08:00
parent bb70634a96
commit f818dd0307
15 changed files with 260 additions and 32 deletions
+11 -1
View File
@@ -143,14 +143,24 @@ export type BillingConfig = {
balanceCents: number;
};
export type JsapiPayParams = {
appId: string;
timeStamp: string;
nonceStr: string;
package: string;
signType: 'MD5' | 'RSA';
paySign: string;
};
export type RechargeOrder = {
id: string;
amountCents: number;
status: 'pending' | 'paid' | 'failed' | 'expired' | 'refunded';
payMode: 'native' | 'h5';
payMode: 'native' | 'h5' | 'jsapi';
expireAt: number;
codeUrl?: string | null;
h5Url?: string | null;
jsapiParams?: JsapiPayParams | null;
};
export type InsufficientBalanceDetails = {