q-koa 13.8.33 → 13.8.35

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.
@@ -95,8 +95,8 @@ const validateUnionNotifySign = ({ notifyData, signType, publicKey, md5Key }) =>
95
95
  if (!notifyData || !notifyData.sign) return false
96
96
  const params = { ...notifyData }
97
97
  const sign = String(params.sign)
98
+ // 通联签名规则:仅剔除 sign 字段本身,signtype/signType 仍保留在原串里
98
99
  delete params.sign
99
- delete params.signType // signType 本身不参与签名原文
100
100
 
101
101
  // 通联 buildSignStr:按 ASCII 字典序拼接,跳过空/undefined/null
102
102
  const sortedKeys = Object.keys(params).sort()
@@ -1534,8 +1534,8 @@ exports.union_notify = async (ctx) => {
1534
1534
  return
1535
1535
  }
1536
1536
 
1537
- // 优先按回调带的 signType 决定算法,没有则退到配置 union_signType,再退 RSA
1538
- const rawSignType = (notifyData.signType || union_signType || 'RSA').toUpperCase()
1537
+ // 通联回调报文字段为全小写 signtype;兼容大小写两种 + 配置 union_signType;末位回退 RSA
1538
+ const rawSignType = (notifyData.signtype || notifyData.signType || union_signType || 'RSA').toUpperCase()
1539
1539
  const hasSign = notifyData.sign !== undefined && notifyData.sign !== ''
1540
1540
  const trxstatus = notifyData.trxstatus
1541
1541
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "13.8.33",
3
+ "version": "13.8.35",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {