q-koa 7.9.5 → 7.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -174,11 +174,11 @@ exports.getPhone = async (ctx) => {
|
|
|
174
174
|
exports.mp_getPhoneNew = async (ctx) => {
|
|
175
175
|
const { app, appName } = getAppByCtx(ctx)
|
|
176
176
|
|
|
177
|
-
const { code } = ctx.request.body
|
|
177
|
+
const { code, config = 'weixin_mp' } = ctx.request.body
|
|
178
178
|
|
|
179
179
|
const user_id = ctx.request[appName + '-user'].id
|
|
180
180
|
const appConfig = getConfig(app)
|
|
181
|
-
const { app_id, app_secrect } = await appConfig.getObject(
|
|
181
|
+
const { app_id, app_secrect } = await appConfig.getObject(config)
|
|
182
182
|
|
|
183
183
|
const weixinMp = new WeixinMp({
|
|
184
184
|
appid: app_id,
|
|
@@ -1008,13 +1008,14 @@ exports.sendMessage = async (ctx) => {
|
|
|
1008
1008
|
exports.refund = async (ctx) => {
|
|
1009
1009
|
const { app, appName } = getAppByCtx(ctx)
|
|
1010
1010
|
const appConfig = getConfig(app)
|
|
1011
|
-
const { id, prefix = '', price } = ctx.request.body
|
|
1011
|
+
const { id, prefix = '', price, pay_config = 'weixin_pay' } = ctx.request.body
|
|
1012
1012
|
|
|
1013
1013
|
await app.service.weixin.refund({
|
|
1014
1014
|
ctx,
|
|
1015
1015
|
id,
|
|
1016
|
-
prefix
|
|
1016
|
+
prefix,
|
|
1017
1017
|
price,
|
|
1018
|
+
pay_config,
|
|
1018
1019
|
})
|
|
1019
1020
|
ctx.SUCCESS('ok')
|
|
1020
1021
|
}
|
|
@@ -27,7 +27,7 @@ exports.refund = async ({
|
|
|
27
27
|
pfx: await fsPromise.readFile(
|
|
28
28
|
path.resolve(
|
|
29
29
|
__dirname,
|
|
30
|
-
`${process.cwd()}/app/${appName}/plugins/weixin/apiclient_cert.p12`
|
|
30
|
+
`${process.cwd()}/app/${appName}/plugins/weixin/${pay_config}/apiclient_cert.p12`
|
|
31
31
|
)
|
|
32
32
|
), // 微信商户平台证书
|
|
33
33
|
})
|