支付时检测是否已经微信授权

This commit is contained in:
2026-07-02 17:34:58 +08:00
parent a0f4d8c18f
commit f7fe4597c6
9 changed files with 254 additions and 15 deletions
+8
View File
@@ -21,6 +21,14 @@ export type WechatPayOrderResult =
| { mode: 'mock'; externalNo: string; order?: Record<string, unknown> }
| { mode: 'jsapi'; prepay: WechatJsapiPrepayParams; orderId: string };
/** 业务错误码:微信支付前需完成微信授权 */
export const WECHAT_AUTH_REQUIRED = 'WECHAT_AUTH_REQUIRED';
export type ClientRuntimeConfig = {
mockPay: boolean;
wechatPayEnabled: boolean;
};
export interface WechatLoginResult {
accessToken?: string;
refreshToken?: string;