Commit fdf0b4a1 by 宋毅

tj

parent 73e198dd
......@@ -153,6 +153,7 @@ class utilsTlBankSve {
async getReqBeforeParam(jsonObj, pay_key) {//获取请求前的参数信息
jsonObj.key = pay_key;
var reqResult = { status: 0, msg: "success", req_param: null };
var signArr = [];
var keys = Object.keys(jsonObj).sort();
......@@ -172,10 +173,10 @@ class utilsTlBankSve {
reqResult.msg = "请求组装签名参数信息为空";
return reqResult;
}
var signStr = signArr.join("&") + "&key=" + pay_key;
var signStr = signArr.join("&");
var tmpSign = md5(signStr).toUpperCase();
jsonObj.sign = tmpSign;
reqResult.req_param = jsonObj;
delete jsonObj["key"];
return reqResult;
}
......@@ -350,8 +351,12 @@ class utilsTlBankSve {
parmas.out_trade_no = attachList[0].substr(3);
parmas.uappid = attachList.length == 2 ? attachList[1] : attachList[2];
//重写新签名
var newparmas = await this.getReqBeforeParam(parmas, appinfo.uapp_secret);
var backResult = await this.restClient.execPost(newparmas.req_param, payParam.notify_url);
var signResult = await this.createSign(parmas, appinfo.uapp_secret);
if (signResult.status != 0) {
return signResult;
}
parmas.sign = signResult.data;
var backResult = await this.restClient.execPost(parmas, payParam.notify_url);
if (!backResult.stdout) {
return system.getResult(null, "回调notify_url中方法返回信息为空");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment