q-koa 10.1.3 → 10.1.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.
|
@@ -815,7 +815,7 @@ exports.h5_pay = async (ctx) => {
|
|
|
815
815
|
}/${appName}/weixin/notify`
|
|
816
816
|
const result = await payObj.run({
|
|
817
817
|
body: name,
|
|
818
|
-
out_trade_no: `${key}_${order_id}_${type}`,
|
|
818
|
+
out_trade_no: `${key.length > 10 ? appName : key}_${order_id}_${type}`,
|
|
819
819
|
total_fee: is_admin || is_dev ? 1 : Math.round(price * 100),
|
|
820
820
|
notify_url,
|
|
821
821
|
scene_info: `{"h5_info": {"type":"Wap","wap_url": ${
|
|
@@ -1014,8 +1014,8 @@ exports.mp_pay_new = async (ctx) => {
|
|
|
1014
1014
|
const out_trade_no = _out_trade_no
|
|
1015
1015
|
? _out_trade_no
|
|
1016
1016
|
: prefix
|
|
1017
|
-
? `${key}_${prefix}-${order_id}`
|
|
1018
|
-
: `${key}_${order_id}`
|
|
1017
|
+
? `${key.length > 10 ? appName : key}_${prefix}-${order_id}`
|
|
1018
|
+
: `${key.length > 10 ? appName : key}_${order_id}`
|
|
1019
1019
|
|
|
1020
1020
|
const prePayResult = await weixinMp.createOrder({
|
|
1021
1021
|
openid: userDetail.openid,
|
|
@@ -1367,7 +1367,7 @@ exports.checkPayNew = async (ctx) => {
|
|
|
1367
1367
|
const orderPrefix = prefix ? `${prefix}-` : ''
|
|
1368
1368
|
const out_trade_no = _out_trade_no
|
|
1369
1369
|
? _out_trade_no
|
|
1370
|
-
: `${key}_${orderPrefix}${id}`
|
|
1370
|
+
: `${key.length > 10 ? appName : key}_${orderPrefix}${id}`
|
|
1371
1371
|
|
|
1372
1372
|
const payResult = await weixinMp.getOrder({
|
|
1373
1373
|
trade_no: out_trade_no,
|