Commit d33de19a by 庄冰

payback

parent 1c47eea2
......@@ -853,7 +853,6 @@ class OrderService extends ServiceBase {
}
async receiveTlCallBackNotify(obj) {//接收通联支付回调通知
if (obj && obj.trxstatus == "0000") {
obj.client_ip = "";
let attachList = [];
if (obj.cusorderid.indexOf("_") >= 0) {
attachList = obj.cusorderid.split("_");
......@@ -872,6 +871,10 @@ class OrderService extends ServiceBase {
if(!app){
return system.getResultFail(-100, "渠道参数错误");
}
var resultSign = await this.resultSign(obj,app.appSecret);
if(!resultSign || resultSign.status<0){
return resultSign;
}
var orderInfo = await this.dao.model.findOne({
where:{orderNo:obj.out_trade_no,app_id:app.id},
raw:true
......
var url = require("url");
var system = require("../../base/system");
module.exports = function (app) {
app.use('/tlpay/notify', function (req, res) {
var client_ip = system.get_client_ip(req);
req.body["client_ip"]=client_ip;
var orderSve = system.getObject("service.dborder.orderSve");
var p = orderSve.receiveTlCallBackNotify(req.body);
p.then(r => {
res.end(JSON.stringify(r));
});
});
app.get('/:gname/:qname/:method', function (req, res) {
var classPath = req.params["qname"];
var methodName = req.params["method"];
......
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