q-koa 11.4.0 → 11.4.2
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.
|
@@ -1352,7 +1352,13 @@ exports.refund_notify = async (ctx) => {
|
|
|
1352
1352
|
app_key: key.length > 10 ? key : partner_key,
|
|
1353
1353
|
})
|
|
1354
1354
|
|
|
1355
|
-
const {
|
|
1355
|
+
const {
|
|
1356
|
+
out_refund_no,
|
|
1357
|
+
out_trade_no,
|
|
1358
|
+
total_fee,
|
|
1359
|
+
refund_fee,
|
|
1360
|
+
refund_desc,
|
|
1361
|
+
} = refundResult
|
|
1356
1362
|
|
|
1357
1363
|
const refund_price = Number(refund_fee) / 100
|
|
1358
1364
|
|
|
@@ -1367,9 +1373,7 @@ exports.refund_notify = async (ctx) => {
|
|
|
1367
1373
|
: Number(out_refund_no)
|
|
1368
1374
|
const type = out_refund_no.includes('_') ? out_refund_no.split('_')[1] : ''
|
|
1369
1375
|
const model = prefix ? `${prefix}_order` : 'order'
|
|
1370
|
-
|
|
1371
|
-
// `微信退款回调 prefix:${prefix}/model:${model}/order_id:${order_id}/type:${type}`
|
|
1372
|
-
// )
|
|
1376
|
+
console.log(`微信退款回调 ${refund_desc}`)
|
|
1373
1377
|
if (app.service[model] && app.service[model].refund_notify) {
|
|
1374
1378
|
await app.service[model].refund_notify({
|
|
1375
1379
|
app,
|
|
@@ -1377,6 +1381,8 @@ exports.refund_notify = async (ctx) => {
|
|
|
1377
1381
|
order: model,
|
|
1378
1382
|
refund_price,
|
|
1379
1383
|
type,
|
|
1384
|
+
out_refund_no,
|
|
1385
|
+
remark: refund_desc,
|
|
1380
1386
|
})
|
|
1381
1387
|
}
|
|
1382
1388
|
|
|
@@ -1706,7 +1712,7 @@ exports.setMsgJumpPath = async (ctx) => {
|
|
|
1706
1712
|
const { app, appName } = getAppByCtx(ctx)
|
|
1707
1713
|
const appConfig = getConfig(app)
|
|
1708
1714
|
|
|
1709
|
-
const {config = 'weixin_mp'
|
|
1715
|
+
const { config = 'weixin_mp', path = 'pages/index/index' } = ctx.request.body
|
|
1710
1716
|
const { app_id, app_secrect } = await appConfig.getObject(config)
|
|
1711
1717
|
|
|
1712
1718
|
const weixinMp = new WeixinMp({
|
|
@@ -1721,4 +1727,4 @@ exports.setMsgJumpPath = async (ctx) => {
|
|
|
1721
1727
|
})
|
|
1722
1728
|
|
|
1723
1729
|
ctx.SUCCESS('ok')
|
|
1724
|
-
}
|
|
1730
|
+
}
|