|
@@ -76,7 +76,7 @@ let pay_success = function(args, res){
|
|
|
let serverid = obj.serverid;//服务器id
|
|
|
let userid = obj.userid; //玩家的渠道帐号
|
|
|
let uid = obj.uid; //玩家游戏uid
|
|
|
- let product_id = obj.product_id // 计费点
|
|
|
+ let cfid = obj.cfid // 计费点
|
|
|
let platformid = "googleplay";
|
|
|
let ti = new Date().Format("yyyy-MM-dd hh:mm:ss");
|
|
|
|
|
@@ -103,12 +103,12 @@ let pay_success = function(args, res){
|
|
|
|
|
|
//检查订单
|
|
|
let channel = vals[0].channel
|
|
|
- let conf = config.parse(platformid, channel, product_id);
|
|
|
+ let conf = config.parse(platformid, channel, cfid);
|
|
|
let cfid = conf.cfid;
|
|
|
let amountnum = conf.price
|
|
|
let moneytype = conf.typename;
|
|
|
if (cfid == 0){
|
|
|
- console.log("[GooglePlay] channel:%s获取cfid失败为platformid:%s,product_id:%s",channel, platformid, product_id);
|
|
|
+ console.log("[GooglePlay] channel:%s获取cfid失败为platformid:%s,cfid:%s",channel, platformid, cfid);
|
|
|
try{res.send("fail");}
|
|
|
catch(e){}
|
|
|
return
|
|
@@ -117,8 +117,8 @@ let pay_success = function(args, res){
|
|
|
console.log("[GooglePlay] 订单 %s 处理:\n\t商品配置:%s, 金额:%s, 类型:%s, 用户:%s, 服务器:%s",
|
|
|
channel_order_id,cfid,amountnum,moneytype,uid,serverid);
|
|
|
|
|
|
- if (product_id != vals[0].product_id) {
|
|
|
- console.log("[GooglePlay] 充值订单不匹配:product_id = %s, vals[0].product_id = %s!!", product_id, vals[0].product_id);
|
|
|
+ if (cfid != vals[0].cfid) {
|
|
|
+ console.log("[GooglePlay] 充值订单不匹配:cfid = %s, vals[0].cfid = %s!!", cfid, vals[0].cfid);
|
|
|
}
|
|
|
|
|
|
let timestamp = Date.parse(new Date()) / 1000;
|
|
@@ -128,15 +128,13 @@ let pay_success = function(args, res){
|
|
|
overtime=?,\
|
|
|
flag=?,\
|
|
|
money=?,\
|
|
|
- cfid=?,\
|
|
|
platform=?,\
|
|
|
moneytype=?,\
|
|
|
- product_id=?,\
|
|
|
payment_type=?, \
|
|
|
istest=?\
|
|
|
WHERE orderid=? \
|
|
|
AND flag=2";//增加flag判断防止重复写入
|
|
|
- let values_2 = [channel_order_id,timestamp,1,amountnum,cfid,platform,moneytype,product_id,payment_type,istest,orderid];
|
|
|
+ let values_2 = [channel_order_id,timestamp,1,amountnum,platform,moneytype,payment_type,istest,orderid];
|
|
|
let sql_2 = mysql.format(sql_1, values_2);
|
|
|
console.log(sql_2)
|
|
|
query(sql_2,function(qerr,rows,fields_)
|