Commit e2f658fb by 王栋源

wdy

parent 776c0e9c
......@@ -316,15 +316,15 @@ class utilsTlBankSve {
async receiveCallBackNotify(parmas, client_ip) {//收到通联回调通知---post请求
var result = "FAIL";
var result = {status:-1,msg:""};
try {
if (!parmas) {
result = "回调parmas中参数信息为空";
result.msg = "回调parmas中参数信息为空";
return result;
}
var isVerify = await this.verifyCallBackParams(parmas);
if (isVerify) {
result = isVerify;
result.msg = isVerify;
return result;
}
let attachList = [];
......@@ -335,24 +335,24 @@ class utilsTlBankSve {
attachList.push(parmas.cusorderid);
}
if (attachList.length < 2) {
result = "回调cusorderid参数错误,没有_标识";
result.msg = "回调cusorderid参数错误,没有_标识";
return result;
}
var uappid = attachList.length == 2 ? attachList[1] : attachList[2];
var payParam = await this.getpaymentinfo(uappid);
if (!payParam) {
result.return_msg = "回调公司没有对应的支付凭证";
return jsonBuilder.buildObject(result);
result.msg = "回调公司没有对应的支付凭证";
return result;
}
var appinfo = await this.getappinfo(uappid);
if (!appinfo) {
result.return_msg = "回调公司没有对应的支付凭证";
return jsonBuilder.buildObject(result);
result.msg = "回调公司没有对应的支付凭证";
return result;
}
var signResult = await this.resultSign(parmas, payParam.pay_key);
if (signResult.status != 0) {
result = signResult.msg;
result.msg = signResult.msg;
return result;
}
......@@ -361,17 +361,15 @@ class utilsTlBankSve {
parmas.uappid = attachList.length == 2 ? attachList[1] : attachList[2];
//重写新签名
var newparmas = await this.getReqBeforeParam(parmas, appinfo.uapp_secret);
var signResult = await this.resultSign(newparmas.req_param, appinfo.uapp_secret);
var backResult = await this.execReqInfo(null,payParam.notify_url,newparmas.req_param);
if (backResult.status != 0) {
result = backResult.msg;
result.msg = backResult.msg;
return result;
}
result.status=0;
return result;
} catch (e) {
result = "回调业务处理---error异常";
result.msg = "回调业务处理---error异常";
return result;
}
}
......
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