对接微信支付
This commit is contained in:
@@ -31,7 +31,10 @@ import type { IOssProvider } from './oss/oss.interface';
|
||||
provide: WECHAT_PROVIDER,
|
||||
useFactory: (api: WechatApiProvider, disabled: WechatDisabledProvider): IWechatProvider => {
|
||||
const cfg = loadAppConfig();
|
||||
return cfg.wechatAuthEnabled && cfg.wxAppId ? api : disabled;
|
||||
const enabled =
|
||||
(cfg.wechatAuthEnabled || cfg.wechatPayEnabled) &&
|
||||
(!!cfg.wxAppId || !!process.env.WX_MCH_ID);
|
||||
return enabled ? api : disabled;
|
||||
},
|
||||
inject: [WechatApiProvider, WechatDisabledProvider],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user