Commit 90b3c112 by 王栋源

wdy

parent 79247f95
...@@ -150,37 +150,67 @@ class UtilsNeedSve extends AppServiceBase { ...@@ -150,37 +150,67 @@ class UtilsNeedSve extends AppServiceBase {
}; };
} }
var userpin = ""; var userpin = "";
if (pobj.mobile) { if (pobj.phone) {
//获取用户userpin //获取用户userpin
var userparam = { var userparam = {
actionType: "getLoginByUserName", actionType: "getLoginByUserName",
actionBody: { actionBody: {
"channelUserId": pobj.mobile, "channelUserId": pobj.phone,
"mobile": pobj.mobile, "mobile": pobj.phone,
"userName": pobj.mobile "userName": pobj.phone
} }
}; };
var self=this;
// pobj.actionBody.channelUserId = pobj.mobile;//渠道用户id,没有则用手机号 // pobj.actionBody.channelUserId = pobj.mobile;//渠道用户id,没有则用手机号
// pobj.actionBody.mobile = pobj.mobile;//用户手机号 // pobj.actionBody.mobile = pobj.mobile;//用户手机号
var url = settings.centerChannelUrl() + "/web/auth/accessAuth/springBoard"; var url = settings.centerChannelUrl() + "/api/auth/accessAuth/springBoard";
var userpinResultTmp = await this.execlient.execPostTK(userparam, url, tokenInfo.data.token); var userpinResultTmp = await this.execlient.execPostTK(userparam, url, tokenInfo.data.token);
if (userpinResultTmp.status != 0 && userpinResultTmp.status != 2060) { if (userpinResultTmp.status != 0 && userpinResultTmp.status != 2060) {
return system.getResultFail(-99, "获取userpin失败"); return {
"requestId": self.getUUID(),
"success": false,
"errorMsg": "网络错误",
"errorCode": "ok"
};
} }
userpin = userpinResultTmp.data.userpin; userpin = userpinResultTmp.data.userpin;
if (!userpin) { if (!userpin) {
return system.getResultFail(-88, "获取userpin失败!!"); return {
"requestId": self.getUUID(),
"success": false,
"errorMsg": "网络错误",
"errorCode": "ok"
};
} }
} }
//带userpin请求 //带userpin请求
url = settings.centerChannelUrl() + "/web/opreceive/need/springBoard"; url = settings.centerChannelUrl() + "/api/opreceive/ic/springBoard";
var token = tokenInfo.data.token; var token = tokenInfo.data.token;
var rtn = rtn = await this.execlient.execDataPostByTokenUserPin(sobj, url, token, userpin); var rtn = rtn = await this.execlient.execDataPostByTokenUserPin(sobj, url, token, userpin);
if (!rtn || !rtn.stdout) { if (!rtn || !rtn.stdout) {
return system.getResult(null, "execPost is empty"); return {
"requestId": self.getUUID(),
"success": false,
"errorMsg": "网络错误",
"errorCode": "ok"
};
} }
var result = JSON.parse(rtn.stdout); var result = JSON.parse(rtn.stdout);
return result; if (result.status == 0) {
return {
"requestId": result.requestId,
"success": true,
"errorMsg": "",
"errorCode": "ok"
};
} else {
return {
"requestId": result.requestId,
"success": false,
"errorMsg": result.msg,
"errorCode": "ok"
};
}
} }
} }
......
...@@ -68,7 +68,7 @@ module.exports = function (app) { ...@@ -68,7 +68,7 @@ module.exports = function (app) {
try { try {
var client_ip = system.get_client_ip(req); var client_ip = system.get_client_ip(req);
req.body.action_type="paySuccess"; req.body.action_type="paySuccess";
var result = await utilsNeedSve.reqcenterchannel(req.body, client_ip); var result = await utilsNeedSve.paySuccess(req.body, client_ip);
logCtl.info({ logCtl.info({
optitle: (new Date()).Format("yyyy-MM-dd hh:mm:ss") + "回调处理订单结果:,method=" + req.body.trxcode, optitle: (new Date()).Format("yyyy-MM-dd hh:mm:ss") + "回调处理订单结果:,method=" + req.body.trxcode,
op: "center-channel/tlpay/opBackNotify", op: "center-channel/tlpay/opBackNotify",
......
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