Commit e2f658fb by 王栋源

wdy

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