q-koa 10.5.3 → 10.5.4

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.
@@ -1203,6 +1203,7 @@ exports.refund = async (ctx) => {
1203
1203
  pay_config = 'weixin_pay',
1204
1204
  is_new_pay = false,
1205
1205
  out_trade_no,
1206
+ type,
1206
1207
  } = ctx.request.body
1207
1208
 
1208
1209
  const fn = is_new_pay ? 'refund_new' : 'refund'
@@ -1216,6 +1217,7 @@ exports.refund = async (ctx) => {
1216
1217
  config,
1217
1218
  pay_config,
1218
1219
  out_trade_no,
1220
+ type,
1219
1221
  })
1220
1222
  ctx.SUCCESS('ok')
1221
1223
  }
@@ -13,7 +13,7 @@ exports.refund = async ({
13
13
  total_fee,
14
14
  refund_fee,
15
15
  price,
16
- type = '',
16
+ type = 'MP-WEIXIN',
17
17
  config = 'weixin_mp',
18
18
  pay_config = 'weixin_pay',
19
19
  out_trade_no: _out_trade_no,
@@ -41,8 +41,8 @@ exports.refund = async ({
41
41
  const out_trade_no = _out_trade_no
42
42
  ? _out_trade_no
43
43
  : prefix
44
- ? `${key}_${prefix}-${id}_MP-WEIXIN`
45
- : `${key}_${id}_MP-WEIXIN`
44
+ ? `${key}_${prefix}-${id}_${type}`
45
+ : `${key}_${id}_${type}`
46
46
  const orderDetail = await app.model[orderModel].findOne({
47
47
  where: {
48
48
  id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "10.5.3",
3
+ "version": "10.5.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {