protected void Page_Load(object sender, EventArgs e) { if (Request.RequestType != "GET") { return; } string sacc = Request.Params["acc"]; if (string.IsNullOrEmpty(sacc)) { ReturnMsg("data error"); return; } string table = ConfigurationManager.AppSettings["acc_default"]; if (string.IsNullOrEmpty(table)) { ReturnMsg("error platform");//platform error return; } //List<IMongoQuery> imqs = new List<IMongoQuery>(); //imqs.Add(Query.EQ("acc", sacc)); Dictionary <string, object> data = MongodbAccount.Instance.ExecuteGetBykey(table, "acc", sacc, new string[] { "randkey", "lasttime" }); if (data != null && data.Count >= 2) { string jsonstr = data["randkey"].ToString() + "_" + data["lasttime"].ToString(); //JsonHelper.ConvertToStr(data); string err = ""; AccInfo accInfo = new AccInfo(); int money = GetAbroadMoney(sacc, ref err, accInfo); if (money >= 0) { ReturnMsg(jsonstr.Trim(), true, money, accInfo); ExceptionCheckInfo.doSaveCheckInfo(Request, "login"); } else { ReturnMsg(err, false); } } else { ReturnMsg("db error"); } }
protected void Page_Load(object sender, EventArgs e) { CLOG.Info("xk ... 账户检查"); if (Request.RequestType != "GET") { return; } string sacc = Request.Params["acc"]; string platform = Request.Params["platform"]; if (string.IsNullOrEmpty(sacc) || string.IsNullOrEmpty(platform)) { ReturnMsg("data error"); return; } string table = ConfigurationManager.AppSettings["acc_" + platform]; if (string.IsNullOrEmpty(table)) { ReturnMsg("error platform");//platform error return; } //List<IMongoQuery> imqs = new List<IMongoQuery>(); //imqs.Add(Query.EQ("acc", sacc)); string acckey = ConfigurationManager.AppSettings["acckey_" + platform]; if (string.IsNullOrEmpty(acckey)) { acckey = "acc"; } Dictionary <string, object> data = MongodbAccount.Instance.ExecuteGetBykey(table, acckey, sacc, new string[] { "randkey", "lasttime" }); if (data != null && data.Count >= 2) { string jsonstr = data["randkey"].ToString() + "_" + data["lasttime"].ToString(); //JsonHelper.ConvertToStr(data); ReturnMsg(jsonstr.Trim(), true); ExceptionCheckInfo.doSaveCheckInfo(Request, "login"); } else { ReturnMsg("db error"); } }
protected void Page_Load(object sender, EventArgs e) { //account //orderid //platform string platform = Request.Params["platform"]; string orderid = Request.Params["orderid"]; string account = Request.Params["account"]; if (string.IsNullOrEmpty(platform) || string.IsNullOrEmpty(account) || string.IsNullOrEmpty(orderid)) { ReturnMsg("data error");//data error return; } string table = ConfigurationManager.AppSettings["pay_" + platform]; if (string.IsNullOrEmpty(table)) { ReturnMsg("error platform");//platform error return; } string splayerid = Request.Params["playerid"]; if (string.IsNullOrEmpty(splayerid)) { splayerid = "0"; } int playerid = 0; try { playerid = Convert.ToInt32(splayerid); } catch (Exception) { } if (splayerid == "0") { splayerid = account; } List <IMongoQuery> lmq = new List <IMongoQuery>(); //百度视频PC支付没有playerid //if (platform == "baiduview") //{ lmq.Add(Query.EQ("Account", account)); //} //else //{ // if (playerid > 0) // lmq.Add(Query.EQ("PlayerId", playerid)); // else // lmq.Add(Query.EQ("Account", account)); //} lmq.Add(Query.EQ("OrderID", orderid)); lmq.Add(Query.EQ("Process", false)); var one = MongodbPayment.Instance.ExecuteGetByQuery(table, Query.And(lmq), new string[] { "PayCode", "RMB", "Custom" }); if (one != null) { Dictionary <string, object> data = new Dictionary <string, object>(); data["Process"] = true; data["UpdateTime"] = DateTime.Now; if (playerid > 0) { data["PlayerId"] = playerid; } string err = MongodbPayment.Instance.ExecuteUpdate(table, "OrderID", orderid, data); string rmb = one["RMB"].ToString(); string custom = "0"; if (one.ContainsKey("Custom")) { custom = one["Custom"].ToString(); } if (err == string.Empty) { ReturnMsg(one["PayCode"].ToString() + " " + rmb + " " + orderid + " " + custom, platform, true); ExceptionCheckInfo.doSaveCheckInfo(Request, "recharge"); TalkingGame tg = new TalkingGame(); tg.adddata(splayerid, orderid, one["RMB"].ToString(), one["PayCode"].ToString()); tg.PostToTG(); } else { ReturnMsg(err); } } else { ReturnMsg("can't find orderid");//需要返回payid } }
protected void Page_Load(object sender, EventArgs e) { ExceptionCheckInfo.doSaveCheckInfo(Request, "crash"); }
protected void Page_Load(object sender, EventArgs e) { //account //platform string platform = Request.Params["platform"]; string account = Request.Params["account"]; if (string.IsNullOrEmpty(platform) || string.IsNullOrEmpty(account)) { ReturnMsg("data error");//data error return; } string table = ConfigurationManager.AppSettings["pay_" + platform]; //string table = "anysdk_pay"; if (string.IsNullOrEmpty(table)) { ReturnMsg("error platform");//platform error return; } string splayerid = Request.Params["playerid"]; if (string.IsNullOrEmpty(splayerid)) { splayerid = "0"; } int playerid = 0; try { playerid = Convert.ToInt32(splayerid); } catch (Exception) { } if (splayerid == "0") { splayerid = account; } List <IMongoQuery> lmq = new List <IMongoQuery>(); //百度视频PC支付没有playerid //if (true) //{ lmq.Add(Query.EQ("Account", account)); //} //else //{ // if (playerid > 0) // lmq.Add(Query.EQ("PlayerId", playerid)); // else // lmq.Add(Query.EQ("Account", account)); //} lmq.Add(Query.EQ("Process", false)); TalkingGame tg = new TalkingGame(); var list = MongodbPayment.Instance.ExecuteGetListByQuery(table, Query.And(lmq), new string[] { "OrderID", "PayCode", "RMB", "Custom" }); if (list.Count > 0) { string ret = string.Empty; foreach (var it in list) { string rmb = "0"; if (Convert.ToBoolean(ConfigurationManager.AppSettings["check_money"])) { rmb = it["RMB"].ToString(); } string custom = "0"; if (it.ContainsKey("Custom")) { custom = it["Custom"].ToString(); } ret += (" " + it["PayCode"].ToString() + ":" + rmb + ":" + it["OrderID"].ToString() + ":" + custom); tg.adddata(splayerid, it["OrderID"].ToString(), it["RMB"].ToString(), it["PayCode"].ToString()); } Dictionary <string, object> data = new Dictionary <string, object>(); data["Process"] = true; data["UpdateTime"] = DateTime.Now; if (playerid > 0) { data["PlayerId"] = playerid; } string err = MongodbPayment.Instance.ExecuteUpdateByQuery(table, Query.And(lmq), data, UpdateFlags.Multi); if (err == string.Empty) { ReturnMsg(ret.Trim(), platform, true); ExceptionCheckInfo.doSaveCheckInfo(Request, "recharge"); tg.PostToTG(); } else { ReturnMsg(err); } } else { ReturnMsg("can't find orderid");//需要返回payid } }