Esempio n. 1
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            AccountsProtect protect = new AccountsProtect();

            protect.UserID      = Fetch.GetUserCookie().UserID;
            protect.InsurePass  = TextEncrypt.EncryptPassword(CtrlHelper.GetText(txtNewPass));
            protect.Response1   = CtrlHelper.GetText(txtResponse1);
            protect.Response2   = CtrlHelper.GetText(txtResponse2);
            protect.Response3   = CtrlHelper.GetText(txtResponse3);
            protect.LastLogonIP = GameRequest.GetUserIP();

            Message umsg = accountsFacade.ResetInsurePasswd(protect);

            if (umsg.Success)
            {
                this.form1.Visible = false;

                this.divRight.Visible   = true;
                this.divRight.InnerHtml = "<div class=\"Uright\">重置银行密码成功!</div>";
            }
            else
            {
                Show(umsg.Content);
                this.txtResponse1.Text = "";
                this.txtResponse2.Text = "";
                this.txtResponse3.Text = "";
            }
        }
Esempio n. 2
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            AccountsProtect protect = new AccountsProtect();

            protect.UserID      = Fetch.GetUserCookie().UserID;
            protect.InsurePass  = TextEncrypt.EncryptPassword(CtrlHelper.GetTextAndFilter(txtNewPass));
            protect.Response1   = CtrlHelper.GetTextAndFilter(txtResponse1);
            protect.Response2   = CtrlHelper.GetTextAndFilter(txtResponse2);
            protect.Response3   = CtrlHelper.GetTextAndFilter(txtResponse3);
            protect.LastLogonIP = GameRequest.GetUserIP();

            Message umsg = FacadeManage.aideAccountsFacade.ResetInsurePasswd(protect);

            if (umsg.Success)
            {
                RenderAlertInfo2(false, "重置银行密码成功!");
            }
            else
            {
                Show(umsg.Content);
                this.txtResponse1.Text = "";
                this.txtResponse2.Text = "";
                this.txtResponse3.Text = "";
            }
        }
Esempio n. 3
0
        public string Logon(string userName, string userPass, string code)
        {
            string msg = "";

            if (TextUtility.EmptyTrimOrNull(userName) || TextUtility.EmptyTrimOrNull(userPass))
            {
                msg = "抱歉!您输入的用户名或密码错误了。";
                return("{success:'error',msg:'" + msg + "'}");
            }

            //验证码错误
            if (!code.Equals(Fetch.GetVerifyCode( ), StringComparison.InvariantCultureIgnoreCase))
            {
                msg = "抱歉!您输入的验证码错误了。";
                return("{success:'error',msg:'" + msg + "'}");
            }

            Message umsg = accountFacade.Logon(userName, userPass);

            if (umsg.Success)
            {
                UserInfo ui = umsg.EntityList[0] as UserInfo;
                ui.LogonPass = TextEncrypt.EncryptPassword(userPass);

                Fetch.SetUserCookie(ui.ToUserTicketInfo( ));
                string mOrder = ui.MemberOrder == 0 ? "普通会员" : ui.MemberOrder == 1 ? "蓝钻会员" : ui.MemberOrder == 2 ? "黄钻会员" : ui.MemberOrder == 3 ? "白钻会员" : "红钻会员";
                msg = "{success:'success',account:'" + ui.Accounts + "',gid:'" + ui.GameID + "',loves:'" + ui.LoveLiness + "',morder:'" + mOrder + "',fid:'" + ui.FaceID + "'}";
            }
            else
            {
                msg = "{success:'error',msg:'" + umsg.Content + "'}";
            }
            return(msg);
        }
Esempio n. 4
0
        public static string PementQuery(string merchant_order)
        {
            string url      = ApplicationSettings.Get("url_san") + "/Pay/PementQuery.aspx";
            string value    = ApplicationSettings.Get("partner_san");
            string password = ApplicationSettings.Get("key_san");
            Dictionary <string, string> dictionary = new Dictionary <string, string>();

            dictionary["mer_id"]     = value;
            dictionary["order_id"]   = merchant_order;
            dictionary["time_stamp"] = DateTime.Now.ToString("yyyyMMddHHmmss");
            string text = "";

            foreach (KeyValuePair <string, string> item in dictionary)
            {
                string text2 = text;
                text = text2 + item.Key + "=" + item.Value + "&";
            }
            password = TextEncrypt.EncryptPassword(password).ToLower();
            string text4 = dictionary["sign"] = TextEncrypt.EncryptPassword(text + "key=" + password).ToLower();
            string param = HttpHelper.GetParam(dictionary);
            string json  = HttpHelper.HttpRequest(url, param);
            Dictionary <string, string> dictionary2 = JsonHelper.DeserializeJsonToObject <Dictionary <string, string> >(json);

            if (dictionary2.ContainsKey("status_code"))
            {
                if (dictionary2["status_code"] == "0")
                {
                    return("SUCCESS");
                }
                return(dictionary2["status_msg"].ToString());
            }
            return("查询订单失败");
        }
Esempio n. 5
0
        protected void btnConfirm_Click(object sender, EventArgs e)
        {
            GameMatchUserInfo userInfo = new GameMatchUserInfo( );

            userInfo.Accounts      = CtrlHelper.GetText(txtAccounts);
            userInfo.ClientIP      = GameRequest.GetUserIP( );
            userInfo.CollectDate   = DateTime.Now;
            userInfo.Compellation  = CtrlHelper.GetText(txtCompellation);
            userInfo.DwellingPlace = CtrlHelper.GetText(txtDwellingPlace);
            userInfo.EMail         = CtrlHelper.GetText(txtEMail);
            userInfo.Gender        = Convert.ToByte(rdoFemale.Checked == true ? 0 : 1);
            userInfo.MatchID       = XID;
            userInfo.MobilePhone   = CtrlHelper.GetText(txtMobilePhone);
            userInfo.PassportID    = CtrlHelper.GetText(txtPassportID);
            userInfo.PostalCode    = CtrlHelper.GetText(txtPostalCode);
            userInfo.QQ            = CtrlHelper.GetText(txtQQ);

            Message umsg = webFacade.AddGameMatch(userInfo, TextEncrypt.EncryptPassword(CtrlHelper.GetText(txtPwd)));

            if (umsg.Success)
            {
                ShowAndRedirect("报名成功!", "/Match/Index.aspx");
            }
            else
            {
                Show(umsg.Content);
            }
        }
Esempio n. 6
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string strAccounts = context.Request.Form["txtAccounts"] ?? string.Empty;
            string serialID    = context.Request.Form["txtSerialID"] ?? string.Empty;
            string password    = context.Request.Form["txtPassword"] ?? string.Empty;

            if (string.IsNullOrEmpty(strAccounts) || string.IsNullOrEmpty(serialID) || string.IsNullOrEmpty(password))
            {
                context.Response.Write("-1");
            }
            ShareDetialInfo detailInfo = new ShareDetialInfo();

            detailInfo.SerialID   = serialID;
            detailInfo.OperUserID = 0;
            detailInfo.Accounts   = strAccounts;
            detailInfo.ShareID    = 1;          //实卡充值服务标识
            detailInfo.IPAddress  = Utility.UserIP;
            #region 充值
            Message umsg = treasureFacade.FilledLivcard(detailInfo, TextEncrypt.EncryptPassword(password));
            if (umsg.Success)
            {
                context.Response.Write("0");
            }
            else
            {
                context.Response.Write(umsg.Content);
            }
        }
        protected void Page_Load(object sender, System.EventArgs e)
        {
            string text     = base.Request["mchid"];
            string text2    = base.Request["out_trade_no"];
            string text3    = base.Request["fee"];
            string text4    = base.Request["sign"];
            string text5    = base.Request["result_code"];
            string arg_66_0 = base.Request["time_end"];

            if (!(text5 == "0"))
            {
                Log.Write("支付系统错误 opstate:" + text5 + " orderid:" + text2);
                base.Response.Write("支付系统错误");
            }
            else
            {
                string text6 = ApplicationSettings.Get("key_168");
                string text7 = string.Concat(new string[]
                {
                    text,
                    "&",
                    text3,
                    "&",
                    text2,
                    "&",
                    text6
                });
                string text8 = TextEncrypt.EncryptPassword(text7);
                if (!(text4.ToLower() == text8.ToLower()))
                {
                    Log.Write(string.Concat(new string[]
                    {
                        "签名错误,signSource=",
                        text7,
                        " mySign=",
                        text8,
                        " Sign=",
                        text4
                    }));
                    base.Response.Write("签名错误");
                }
                else
                {
                    ShareDetialInfo shareDetialInfo = new ShareDetialInfo();
                    shareDetialInfo.OrderID   = text2;
                    shareDetialInfo.IPAddress = Utility.UserIP;
                    shareDetialInfo.PayAmount = System.Convert.ToDecimal(text3) / 100m;
                    Message message = FacadeManage.aideTreasureFacade.FilliedOnline(shareDetialInfo, 0);
                    if (message.Success)
                    {
                        base.Response.Write("success");
                    }
                    else
                    {
                        Log.Write(message.Content);
                    }
                }
            }
        }
 public Message Logon(UserInfo user, bool isEncryptPasswd)
 {
     if (!isEncryptPasswd)
     {
         user.LogonPass = TextEncrypt.EncryptPassword(user.LogonPass);
     }
     return(this.accountsData.Login(user));
 }
Esempio n. 9
0
        /// <summary>
        /// 充值按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnPay_Click(object sender, EventArgs e)
        {
            string strAccounts   = CtrlHelper.GetText(txtAccounts);
            string strReAccounts = CtrlHelper.GetText(txtAccounts2);
            string serialID      = CtrlHelper.GetText(txtSerialID);
            string password      = CtrlHelper.GetText(txtPassword);

            if (strAccounts == "")
            {
                RenderAlertInfo(true, "抱歉,请输入游戏帐号。", 2);
                return;
            }
            if (strReAccounts != strAccounts)
            {
                RenderAlertInfo(true, "抱歉,两次输入的帐号不一致。", 2);
                return;
            }
            if (serialID == "")
            {
                RenderAlertInfo(true, "抱歉,请输入充值卡号。", 2);
                return;
            }
            if (password == "")
            {
                RenderAlertInfo(true, "抱歉,请输入卡号密码。", 2);
                return;
            }

            //充值信息
            ShareDetialInfo detailInfo = new ShareDetialInfo();

            detailInfo.SerialID = CtrlHelper.GetText(txtSerialID);
            if (userTicket == null)
            {
                detailInfo.OperUserID = 0;
            }
            else
            {
                detailInfo.OperUserID = userTicket.UserID;
            }
            detailInfo.Accounts  = strAccounts;
            detailInfo.ShareID   = 1;           //实卡充值服务标识
            detailInfo.IPAddress = Utility.UserIP;

            #region 充值

            Message umsg = FacadeManage.aideTreasureFacade.FilledLivcard(detailInfo, TextEncrypt.EncryptPassword(txtPassword.Text.Trim()));
            if (umsg.Success)
            {
                RenderAlertInfo(false, "实卡充值成功。", 2);
            }
            else
            {
                RenderAlertInfo(true, umsg.Content, 2);
            }

            #endregion
        }
Esempio n. 10
0
        /// <summary>
        /// 注册按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnRegister_Click(object sender, EventArgs e)
        {
            if (TextUtility.EmptyTrimOrNull(txtAccounts.Text.Trim()) || TextUtility.EmptyTrimOrNull(txtLogonPass.Text.Trim()))
            {
                Show("抱歉!您输入的用户名或密码错误了。");
                this.txtAccounts.Focus();
                return;
            }

            //验证码错误
            if (!txtCode.Text.Trim().Equals(Fetch.GetVerifyCode(), StringComparison.InvariantCultureIgnoreCase))
            {
                Show("抱歉!您输入的验证码错误了。");
                this.txtAccounts.Focus();
                return;
            }

            Message umsg = accountsFacade.IsAccountsExist(CtrlHelper.GetText(txtAccounts));

            if (!umsg.Success)
            {
                Show(umsg.Content);
                this.txtAccounts.Focus();
                return;
            }

            UserInfo user = new UserInfo();

            user.Accounts      = CtrlHelper.GetText(txtAccounts);
            user.Compellation  = CtrlHelper.GetText(txtCompellation);
            user.FaceID        = Convert.ToInt16(hfFaceID.Value.Trim());
            user.Gender        = Convert.ToByte(ddlGender.SelectedValue);
            user.InsurePass    = TextEncrypt.EncryptPassword(CtrlHelper.GetText(txtInsurePass1));
            user.LastLogonDate = DateTime.Now;
            user.LastLogonIP   = GameRequest.GetUserIP();
            user.LogonPass     = TextEncrypt.EncryptPassword(CtrlHelper.GetText(txtLogonPass));
            user.NickName      = CtrlHelper.GetText(txtNickname);
            user.PassPortID    = CtrlHelper.GetText(txtPassPortID);
            user.RegisterDate  = DateTime.Now;
            user.RegisterIP    = GameRequest.GetUserIP();

            Message msg = accountsFacade.Register(user, CtrlHelper.GetText(txtSpreader));

            if (msg.Success)
            {
                UserInfo ui = msg.EntityList[0] as UserInfo;
                ui.LogonPass = TextEncrypt.EncryptPassword(CtrlHelper.GetText(txtLogonPass));
                Fetch.SetUserCookie(ui.ToUserTicketInfo( ));

                ShowAndRedirect("注册成功!", "/Member/MIndex.aspx");
            }
            else
            {
                Show(msg.Content);
                this.txtAccounts.Focus();
            }
        }
Esempio n. 11
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string Accounts = context.Request.Params["Ilogname"];
            string NickName = context.Request.Params["InickName"];
            //string Compellation = context.Request.Params["Iname"];
            string LogonPass = context.Request.Params["Ipwd"];
            //string PassPortID = context.Request.Params["Iid"];
            string   Spreader = context.Request.Params["Ispre"];
            UserInfo user     = new UserInfo();

            user.Accounts     = Accounts;
            user.Compellation = "";
            //user.FaceID = Convert.ToInt16(hfFaceID.Value.Trim());
            // user.Gender = Convert.ToByte(ddlGender.SelectedValue);
            user.InsurePass    = TextEncrypt.EncryptPassword(LogonPass);
            user.LastLogonDate = DateTime.Now;
            user.LastLogonIP   = GameRequest.GetUserIP();
            user.LogonPass     = TextEncrypt.EncryptPassword(LogonPass);
            user.NickName      = NickName;
            user.PassPortID    = "";
            user.RegisterDate  = DateTime.Now;
            user.RegisterIP    = GameRequest.GetUserIP();

            string strType = "";

            if (System.Web.HttpContext.Current.Request.Cookies["asd"] != null)
            {
                strType = System.Web.HttpContext.Current.Request.Cookies["asd"].Value.ToString();
            }

            int nType = 8;

            if (strType == "2")
            {
                nType = 2;
            }
            else if (strType == "5")
            {
                nType = 5;
            }

            Message msg = accountsFacade.Register(user, Spreader, nType);

            if (msg.Success)
            {
                UserInfo ui = msg.EntityList[0] as UserInfo;
                ui.LogonPass = TextEncrypt.EncryptPassword(LogonPass);
                Fetch.SetUserCookie(ui.ToUserTicketInfo());
                context.Response.Write("success");
            }
            else
            {
                context.Response.Write(msg.Content);
            }
        }
Esempio n. 12
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            System.Collections.Generic.Dictionary <string, string> dictionary = new System.Collections.Generic.Dictionary <string, string>();
            dictionary["app_id"]     = base.Request.Form["app_id"];
            dictionary["order_id"]   = base.Request.Form["order_id"];
            dictionary["pay_seq"]    = base.Request.Form["pay_seq"];
            dictionary["pay_amt"]    = base.Request.Form["pay_amt"];
            dictionary["pay_result"] = base.Request.Form["pay_result"];
            string text = "";

            foreach (System.Collections.Generic.KeyValuePair <string, string> current in dictionary)
            {
                string text2 = text;
                text = string.Concat(new string[]
                {
                    text2,
                    current.Key,
                    "=",
                    current.Value,
                    "&"
                });
            }
            string text3 = ApplicationSettings.Get("key_san");

            text3 = TextEncrypt.EncryptPassword(text3).ToLower();
            string a = TextEncrypt.EncryptPassword(text + "key=" + text3).ToLower();
            string b = base.Request.Form["sign"];

            if (!(a == b))
            {
                base.Response.Write("签名失败,订单号:" + dictionary["order_id"]);
            }
            else
            {
                if (!(dictionary["pay_result"] == "20"))
                {
                    base.Response.Write("充值失败,订单号:" + dictionary["order_id"]);
                }
                else
                {
                    ShareDetialInfo shareDetialInfo = new ShareDetialInfo();
                    shareDetialInfo.OrderID   = dictionary["order_id"];
                    shareDetialInfo.IPAddress = Utility.UserIP;
                    shareDetialInfo.PayAmount = System.Convert.ToDecimal(dictionary["pay_amt"]);
                    Message message = FacadeManage.aideTreasureFacade.FilliedOnline(shareDetialInfo, 0);
                    if (message.Success)
                    {
                        base.Response.Write("ok");
                    }
                    else
                    {
                        base.Response.Write(message.Content + ",订单号:" + dictionary["order_id"]);
                    }
                }
            }
        }
Esempio n. 13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str = ApplicationSettings.Get("key_th");
            Dictionary <string, string> dictionary = new Dictionary <string, string>();

            dictionary["versionId"]     = base.Request["versionId"];
            dictionary["transType"]     = base.Request["transType"];
            dictionary["asynNotifyUrl"] = base.Request["asynNotifyUrl"];
            dictionary["synNotifyUrl"]  = base.Request["synNotifyUrl"];
            dictionary["merId"]         = base.Request["merId"];
            dictionary["orderAmount"]   = base.Request["orderAmount"];
            dictionary["prdOrdNo"]      = base.Request["prdOrdNo"];
            dictionary["orderStatus"]   = base.Request["orderStatus"];
            dictionary["payId"]         = base.Request["payId"];
            dictionary["payTime"]       = base.Request["payTime"];
            dictionary["signType"]      = base.Request["signType"];
            dictionary = (
                from p in dictionary
                orderby p.Key
                select p).ToDictionary <KeyValuePair <string, string>, string, string>((KeyValuePair <string, string> p) => p.Key, (KeyValuePair <string, string> o) => o.Value);
            string password = string.Concat(PayHelper.PrepareSign(dictionary), "&key=", str);

            dictionary["signData"] = base.Request["signData"];
            if (dictionary["orderStatus"] == "01")
            {
                string text = TextEncrypt.EncryptPassword(password);
                if (dictionary["signData"] == text)
                {
                    ShareDetialInfo shareDetialInfo = new ShareDetialInfo()
                    {
                        OrderID   = dictionary["prdOrdNo"],
                        IPAddress = Utility.UserIP,
                        PayAmount = Convert.ToDecimal(dictionary["orderAmount"]) / new decimal(100)
                    };
                    Message message = FacadeManage.aideTreasureFacade.FilliedOnline(shareDetialInfo, 0);
                    if (!message.Success)
                    {
                        Log.Write(message.Content);
                    }
                    else
                    {
                        base.Response.Write("SUCCESS");
                    }
                }
                else
                {
                    Log.Write(string.Concat("签名错误,mySign:", text, "——Sign=", dictionary["signData"]));
                    base.Response.Write("签名错误");
                }
            }
            else
            {
                Log.Write("支付系统错误");
                base.Response.Write("支付系统错误");
            }
        }
Esempio n. 14
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string strAccounts   = context.Request.Params["txtAccounts"];
            string strReAccounts = context.Request.Params["txtAccounts2"];
            string serialID      = context.Request.Params["txtSerialID"];
            string password      = TextEncrypt.EncryptPassword(context.Request.Params["txtPassword"]);

            if (strAccounts == "")
            {
                context.Response.Write("1");
                // RenderAlertInfo(true, "抱歉,请输入游戏账号。", 2);
                return;
            }
            if (strReAccounts != strAccounts)
            {
                context.Response.Write("2");
                //RenderAlertInfo(true, "抱歉,两次输入的帐号不一致。", 2);
                return;
            }
            if (serialID == "")
            {
                context.Response.Write("3");
                // RenderAlertInfo(true, "抱歉,请输入充值卡号。", 2);
                return;
            }
            if (password == "")
            {
                context.Response.Write("4");
                // RenderAlertInfo(true, "抱歉,请输入卡号密码。", 2);
                return;
            }

            //充值信息
            ShareDetialInfo detailInfo = new ShareDetialInfo();

            detailInfo.SerialID   = serialID;
            detailInfo.OperUserID = 0;
            detailInfo.Accounts   = strAccounts;
            detailInfo.ShareID    = 1;          //实卡充值服务标识
            detailInfo.IPAddress  = Utility.UserIP;

            #region 充值

            Message umsg = treasureFacade.FilledLivcard(detailInfo, password);
            if (umsg.Success)
            {
                context.Response.Write("0");
                //RenderAlertInfo(false, "实卡充值成功。", 2);
            }
            else
            {
                context.Response.Write(umsg.Content);
                // RenderAlertInfo(true, umsg.Content, 2);
            }
        }
Esempio n. 15
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            string text     = base.Request["customerid"];
            string text2    = base.Request["sdorderno"];
            string text3    = base.Request["total_fee"];
            string text4    = base.Request["status"];
            string text5    = base.Request["paytype"];
            string text6    = base.Request["sdpayno"];
            string arg_78_0 = base.Request["remark"];
            string text7    = base.Request["sign"];

            if (text4 == "1")
            {
                string text8 = ApplicationSettings.Get("key_lf");
                string text9 = string.Format("customerid={0}&status={1}&sdpayno={2}&sdorderno={3}&total_fee={4}&paytype={5}&{6}", new object[]
                {
                    text,
                    text4,
                    text6,
                    text2,
                    text3,
                    text5,
                    text8
                });
                string text10 = TextEncrypt.EncryptPassword(text9);
                if (text7.ToLower() == text10.ToLower())
                {
                    ShareDetialInfo shareDetialInfo = new ShareDetialInfo();
                    shareDetialInfo.OrderID   = text2;
                    shareDetialInfo.IPAddress = Utility.UserIP;
                    shareDetialInfo.PayAmount = System.Convert.ToDecimal(text3);
                    Message message = FacadeManage.aideTreasureFacade.FilliedOnline(shareDetialInfo, 0);
                    if (message.Success)
                    {
                        base.Response.Write("success");
                    }
                    else
                    {
                        Log.Write(message.Content);
                    }
                }
                else
                {
                    Log.Write(string.Concat(new string[]
                    {
                        "签名错误,signSource=",
                        text9,
                        " mySign=",
                        text10,
                        " Sign=",
                        text7
                    }));
                    base.Response.Write("签名错误");
                }
            }
        }
Esempio n. 16
0
        /// <summary>
        /// 用户登录
        /// </summary>
        public Message Logon(UserInfo user, bool isEncryptPasswd)
        {
            Message umsg;

            if (!isEncryptPasswd)
            {
                user.LogonPass = TextEncrypt.EncryptPassword(user.LogonPass);
            }

            umsg = accountsData.Login(user);
            return(umsg);
        }
Esempio n. 17
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            System.Collections.Generic.Dictionary <string, string> dictionary = new System.Collections.Generic.Dictionary <string, string>();
            dictionary["orderid"]    = base.Request["orderid"];
            dictionary["result"]     = base.Request["result"];
            dictionary["cardtype"]   = base.Request["cardtype"];
            dictionary["realamount"] = base.Request["realamount"];
            dictionary["dealtime"]   = base.Request["dealtime"];
            dictionary["userpara"]   = base.Request["userpara"];
            dictionary["sign"]       = base.Request["sign"];
            string text     = ApplicationSettings.Get("key_45");
            string password = string.Concat(new string[]
            {
                dictionary["orderid"],
                dictionary["result"],
                dictionary["realamount"],
                dictionary["dealtime"],
                dictionary["cardtype"],
                text
            });
            string b = TextEncrypt.EncryptPassword(password).ToLower();

            if (!(dictionary["result"] == "1"))
            {
                Log.Write("充值失败:" + JsonHelper.SerializeObject(dictionary));
                base.Response.Write("充值失败,订单号:" + dictionary["orderid"]);
            }
            else
            {
                if (!(dictionary["sign"] == b))
                {
                    Log.Write("签名失败:" + JsonHelper.SerializeObject(dictionary));
                    base.Response.Write("签名失败,订单号:" + dictionary["orderid"]);
                }
                else
                {
                    ShareDetialInfo shareDetialInfo = new ShareDetialInfo();
                    shareDetialInfo.OrderID   = dictionary["orderid"];
                    shareDetialInfo.IPAddress = Utility.UserIP;
                    shareDetialInfo.PayAmount = System.Convert.ToDecimal(dictionary["realamount"]);
                    Message message = FacadeManage.aideTreasureFacade.FilliedOnline(shareDetialInfo, 0);
                    if (message.Success)
                    {
                        base.Response.Write("OK");
                    }
                    else
                    {
                        Log.Write(message.Content + ":" + JsonHelper.SerializeObject(dictionary));
                        base.Response.Write(message.Content + ",订单号:" + dictionary["orderid"]);
                    }
                }
            }
        }
Esempio n. 18
0
        public void RetrievePassword(HttpContext context)
        {
            Message       msg      = new Message();
            AjaxJsonValid ajaxJson = new AjaxJsonValid();

            string answer1    = GameRequest.GetFormString("Answer1");
            string answer2    = GameRequest.GetFormString("Answer2");
            string answer3    = GameRequest.GetFormString("Answer3");
            string password   = GameRequest.GetFormString("Password");
            string rePassword = GameRequest.GetFormString("RePassword");
            int    userID     = GameRequest.GetFormInt("UserID", 0);

            #region 参数验证
            if (string.IsNullOrEmpty(answer1) || string.IsNullOrEmpty(answer2) || string.IsNullOrEmpty(answer3))
            {
                ajaxJson.msg = "抱歉,密保答案不能为空";
                context.Response.Write(ajaxJson.SerializeToJson());
                return;
            }
            if (string.IsNullOrEmpty(password))
            {
                ajaxJson.msg = "抱歉,新密码不能为空";
                context.Response.Write(ajaxJson.SerializeToJson());
                return;
            }
            if (password != rePassword)
            {
                ajaxJson.msg = "抱歉,两次密码输入不一致";
                context.Response.Write(ajaxJson.SerializeToJson());
                return;
            }
            if (userID <= 0)
            {
                ajaxJson.msg = "抱歉,找回密码用户不存在";
                context.Response.Write(ajaxJson.SerializeToJson());
                return;
            }
            #endregion 参数验证

            AccountsProtect protect = new AccountsProtect();
            protect.UserID      = userID;
            protect.LogonPass   = TextEncrypt.EncryptPassword(password);
            protect.Response1   = answer1;
            protect.Response2   = answer2;
            protect.Response3   = answer3;
            protect.LastLogonIP = GameRequest.GetUserIP();

            Message umsg = FacadeManage.aideAccountsFacade.ResetLogonPasswd(protect);
            ajaxJson.SetValidDataValue(umsg.Success);
            ajaxJson.msg = umsg.Content;
            context.Response.Write(ajaxJson.SerializeToJson());
        }
Esempio n. 19
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            string text     = ApplicationSettings.Get("key_yika");
            string text2    = base.Request["orderid"];
            string text3    = base.Request["opstate"];
            string text4    = base.Request["ovalue"];
            string text5    = base.Request["sign"];
            string arg_60_0 = base.Request["ekaorderid"];
            string arg_71_0 = base.Request["ekatime"];
            string arg_82_0 = base.Request["attach"];
            string arg_93_0 = base.Request["msg"];
            string password = string.Format("orderid={0}&opstate={1}&ovalue={2}{3}", new object[]
            {
                text2,
                text3,
                text4,
                text
            });

            if (!(text3 == "0"))
            {
                Log.Write("充值失败");
            }
            else
            {
                if (!(text5.ToLower() == TextEncrypt.EncryptPassword(password).ToLower()))
                {
                    Log.Write("签名错误");
                    base.Response.Write("签名错误");
                }
                else
                {
                    ShareDetialInfo shareDetialInfo = new ShareDetialInfo();
                    shareDetialInfo.OrderID   = text2;
                    shareDetialInfo.IPAddress = Utility.UserIP;
                    shareDetialInfo.PayAmount = System.Convert.ToDecimal(text4);
                    Message message = FacadeManage.aideTreasureFacade.FilliedOnline(shareDetialInfo, 0);
                    if (message.Success)
                    {
                        Log.Write("充值成功");
                        base.Response.Write("充值成功");
                    }
                    else
                    {
                        Log.Write(message.Content);
                        base.Response.Write(message.Content);
                    }
                }
            }
        }
Esempio n. 20
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            string text = ApplicationSettings.Get("key_ruyi");

            System.Collections.Generic.Dictionary <string, string> dictionary = new System.Collections.Generic.Dictionary <string, string>();
            dictionary["P_UserId"]    = base.Request["P_UserId"];
            dictionary["P_OrderId"]   = base.Request["P_OrderId"];
            dictionary["P_CardId"]    = base.Request["P_CardId"];
            dictionary["P_CardPass"]  = base.Request["P_CardPass"];
            dictionary["P_FaceValue"] = base.Request["P_FaceValue"];
            dictionary["P_ChannelId"] = base.Request["P_ChannelId"];
            dictionary["P_PayMoney"]  = base.Request["P_PayMoney"];
            dictionary["P_ErrCode"]   = base.Request["P_ErrCode"];
            dictionary["P_PostKey"]   = base.Request["P_PostKey"];
            string password = string.Format("{0}|{1}|{2}|{3}|{4}|{5}|{6}|{7}|{8}", new object[]
            {
                dictionary["P_UserId"],
                dictionary["P_OrderId"],
                dictionary["P_CardId"],
                dictionary["P_CardPass"],
                dictionary["P_FaceValue"],
                dictionary["P_ChannelId"],
                dictionary["P_PayMoney"],
                dictionary["P_ErrCode"],
                text
            });
            string b = TextEncrypt.EncryptPassword(password).ToLower();

            if (!(dictionary["P_PostKey"].ToLower() == b))
            {
                Log.Write("签名错误:" + JsonHelper.SerializeObject(dictionary));
                base.Response.Write("签名错误");
            }
            else
            {
                ShareDetialInfo shareDetialInfo = new ShareDetialInfo();
                shareDetialInfo.OrderID   = dictionary["P_OrderId"];
                shareDetialInfo.IPAddress = Utility.UserIP;
                shareDetialInfo.PayAmount = System.Convert.ToDecimal(dictionary["P_PayMoney"]);
                Message message = FacadeManage.aideTreasureFacade.FilliedOnline(shareDetialInfo, 0);
                if (message.Success)
                {
                    base.Response.Write("ErrCode=0");
                }
                else
                {
                    Log.Write(message.Content + ":" + JsonHelper.SerializeObject(dictionary));
                }
            }
        }
Esempio n. 21
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            string text = ApplicationSettings.Get("key_gf");

            System.Collections.Generic.Dictionary <string, string> dictionary = new System.Collections.Generic.Dictionary <string, string>();
            dictionary["orderid"]    = base.Request["orderid"];
            dictionary["opstate"]    = base.Request["opstate"];
            dictionary["ovalue"]     = base.Request["ovalue"];
            dictionary["sysorderid"] = base.Request["sysorderid"];
            dictionary["sign"]       = base.Request["sign"];
            if (!(dictionary["opstate"] == "0"))
            {
                Log.Write("充值失败:" + JsonHelper.SerializeObject(dictionary));
                base.Response.Write("opstate=" + dictionary["opstate"]);
            }
            else
            {
                string password = string.Format("orderid={0}&opstate={1}&ovalue={2}{3}", new object[]
                {
                    dictionary["orderid"],
                    dictionary["opstate"],
                    dictionary["ovalue"],
                    text
                });
                string b = TextEncrypt.EncryptPassword(password).ToLower();
                if (!(dictionary["sign"].ToLower() == b))
                {
                    Log.Write("签名错误:" + JsonHelper.SerializeObject(dictionary));
                    base.Response.Write("签名错误");
                }
                else
                {
                    ShareDetialInfo shareDetialInfo = new ShareDetialInfo();
                    shareDetialInfo.OrderID   = dictionary["orderid"];
                    shareDetialInfo.IPAddress = Utility.UserIP;
                    shareDetialInfo.PayAmount = System.Convert.ToDecimal(dictionary["ovalue"]);
                    Message message = FacadeManage.aideTreasureFacade.FilliedOnline(shareDetialInfo, 0);
                    if (message.Success)
                    {
                        base.Response.Write("opstate=0");
                    }
                    else
                    {
                        Log.Write(message.Content + ":" + JsonHelper.SerializeObject(dictionary));
                    }
                }
            }
        }
        public Message ModifyPowerUserLogonPass(Base_Users admin, Base_Users powerUser, string newPasswd)
        {
            if (admin.UserID != 1 || admin.RoleID != 1)
            {
                return(new Message(false, "您没有修改用户密码的权限。"));
            }
            Message message = GameWebRules.CheckedPassword(newPasswd);

            if (!message.Success)
            {
                return(message);
            }
            newPasswd = TextEncrypt.EncryptPassword(newPasswd);
            aidePlatformManagerData.ModifyUserLogonPass(powerUser, newPasswd);
            return(new Message(true));
        }
Esempio n. 23
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            string str = ApplicationSettings.Get("key_wsf");

            System.Collections.Generic.Dictionary <string, string> dictionary = new System.Collections.Generic.Dictionary <string, string>();
            dictionary["p1_usercode"]      = base.Request["p1_usercode"];
            dictionary["p2_order"]         = base.Request["p2_order"];
            dictionary["p3_money"]         = base.Request["p3_money"];
            dictionary["p4_status"]        = base.Request["p4_status"];
            dictionary["p5_payorder"]      = base.Request["p5_payorder"];
            dictionary["p6_paymethod"]     = base.Request["p6_paymethod"];
            dictionary["p7_paychannelnum"] = base.Request["p7_paychannelnum"];
            dictionary["p8_charset"]       = base.Request["p8_charset"];
            dictionary["p9_signtype"]      = base.Request["p9_signtype"];
            string str2 = "";

            foreach (System.Collections.Generic.KeyValuePair <string, string> current in dictionary)
            {
                str2 = str2 + current.Value + "&";
            }
            string text = TextEncrypt.EncryptPassword(str2 + str);

            dictionary["p10_sign"]   = base.Request["p10_sign"];
            dictionary["p11_remark"] = base.Request["p11_remark"];
            if (!(text.ToLower() == dictionary["p10_sign"].ToLower()))
            {
                Log.Write("签名错误" + dictionary["p2_order"]);
                base.Response.Write("签名错误");
            }
            else
            {
                ShareDetialInfo shareDetialInfo = new ShareDetialInfo();
                shareDetialInfo.OrderID   = dictionary["p2_order"];
                shareDetialInfo.IPAddress = Utility.UserIP;
                shareDetialInfo.PayAmount = System.Convert.ToDecimal(dictionary["p3_money"]);
                Message message = FacadeManage.aideTreasureFacade.FilliedOnline(shareDetialInfo, 0);
                if (message.Success)
                {
                    base.Response.Write("success");
                }
                else
                {
                    Log.Write(message.Content + dictionary["p2_order"]);
                }
            }
        }
Esempio n. 24
0
        public static string GateWayPement(string merchant_order, decimal amount, string bank_account, string bank_card_no, string bank_code, string bankAddress, out string flowid)
        {
            string url      = ApplicationSettings.Get("url_san") + "/Pay/GateWayPement.aspx";
            string value    = ApplicationSettings.Get("partner_san");
            string password = ApplicationSettings.Get("key_san");
            Dictionary <string, string> dictionary = new Dictionary <string, string>();

            dictionary["mer_id"]     = value;
            dictionary["pay_type"]   = "1";
            dictionary["order_id"]   = merchant_order;
            dictionary["order_amt"]  = amount.ToString();
            dictionary["acct_name"]  = bank_account;
            dictionary["acct_id"]    = bank_card_no;
            dictionary["time_stamp"] = DateTime.Now.ToString("yyyyMMddHHmmss");
            string text = "";

            foreach (KeyValuePair <string, string> item in dictionary)
            {
                string text2 = text;
                text = text2 + item.Key + "=" + item.Value + "&";
            }
            password = TextEncrypt.EncryptPassword(password).ToLower();
            string value2 = Jiami.MD5(text + "key=" + password, "UTF-8").ToLower();

            dictionary["acct_name"]   = HttpUtility.UrlEncode(bank_account, Encoding.UTF8);
            dictionary["acct_type"]   = "0";
            dictionary["bank_code"]   = bank_code;
            dictionary["bank_branch"] = HttpUtility.UrlEncode(bankAddress, Encoding.UTF8);
            dictionary["sign"]        = value2;
            string param = HttpHelper.GetParam(dictionary);
            string json  = HttpHelper.HttpRequest(url, param);
            Dictionary <string, string> dictionary2 = JsonHelper.DeserializeJsonToObject <Dictionary <string, string> >(json);

            flowid = "";
            if (dictionary2.ContainsKey("status_code"))
            {
                if (dictionary2["status_code"] == "0")
                {
                    flowid = dictionary2["pay_seq"].ToString();
                    return("SUCCESS");
                }
                return(dictionary2["status_msg"].ToString());
            }
            return("下单失败");
        }
Esempio n. 25
0
        public static string Daifu_45(string merchant_order, decimal amount, string bank_account, string bank_card_no, string bank_code, string bankAddress, string city, out string flowid)
        {
            string url   = ApplicationSettings.Get("url_45");
            string value = ApplicationSettings.Get("partner_45");
            string str   = ApplicationSettings.Get("key_45");
            Dictionary <string, string> dictionary = new Dictionary <string, string>();

            dictionary["UserID"]        = value;
            dictionary["AccountNo"]     = bank_card_no;
            dictionary["AccountName"]   = bank_account;
            dictionary["BankName"]      = bank_code;
            dictionary["OrderID"]       = merchant_order;
            dictionary["Amount"]        = (amount * 100m).ToString();
            dictionary["AccountType"]   = "0";
            dictionary["BankNo"]        = "";
            dictionary["IDType"]        = "";
            dictionary["IDNumber"]      = "";
            dictionary["MobileNo"]      = "";
            dictionary["Province"]      = "";
            dictionary["City"]          = city;
            dictionary["SubbranchName"] = bankAddress;
            Dictionary <string, string> dictionary2 = new Dictionary <string, string>();

            dictionary2["ActionType"] = "SinglePay";
            dictionary2["Data"]       = Convert.ToBase64String(Encoding.UTF8.GetBytes(JsonHelper.SerializeObject(dictionary)));
            dictionary2["Sign"]       = TextEncrypt.EncryptPassword(dictionary2["Data"] + str).ToLower();
            string param = JsonHelper.SerializeObject(dictionary2);
            string text  = HttpHelper.HttpRequest(url, param);

            flowid = "";
            if (text.Contains("Status"))
            {
                Dictionary <string, string> dictionary3 = JsonHelper.DeserializeJsonToObject <Dictionary <string, string> >(text);
                if (dictionary3.ContainsKey("Status"))
                {
                    if (dictionary3["Status"] == "OK")
                    {
                        flowid = dictionary3["OrderID"].ToString();
                        return("SUCCESS");
                    }
                    return(dictionary3["StatusMsg"].ToString());
                }
            }
            return(text);
        }
Esempio n. 26
0
        public string adminlogin(string pwd, string adminname)
        {
            string md5pwd = TextEncrypt.EncryptPassword(pwd);
            bool   result = admin.VLogin(adminname, md5pwd);

            if (result)
            {
                int        uid       = admin.getAdminID(adminname);
                HttpCookie uidcookie = new HttpCookie("g_adminid");
                uidcookie.Value = uid.ToString();
                HttpContext.Current.Response.Cookies.Add(uidcookie);
                return("t");
            }
            else
            {
                return("f");
            }
        }
Esempio n. 27
0
        public string editadminpwd(string newpwd, string adminid)
        {
            admininfo data = new admininfo();

            data.adminid    = TypeParse.DbObjToInt(adminid, 0);
            data.adminpwd   = TextEncrypt.EncryptPassword(newpwd);
            data.updatedate = DateTime.Now;
            bool result = admin.updatepwd(data);

            if (result)
            {
                return("t");
            }
            else
            {
                return("f");
            }
        }
Esempio n. 28
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            string str = ApplicationSettings.Get("key_jifubao");

            System.Collections.Generic.Dictionary <string, string> dictionary = new System.Collections.Generic.Dictionary <string, string>();
            dictionary["service"]   = "TRADE.NOTIFY";
            dictionary["merId"]     = base.Request["merId"];
            dictionary["tradeNo"]   = base.Request["tradeNo"];
            dictionary["tradeDate"] = base.Request["tradeDate"];
            dictionary["opeNo"]     = base.Request["opeNo"];
            dictionary["opeDate"]   = base.Request["opeDate"];
            dictionary["amount"]    = base.Request["amount"];
            dictionary["status"]    = base.Request["status"];
            dictionary["extra"]     = "";
            dictionary["payTime"]   = base.Request["payTime"];
            string str2 = PayHelper.PrepareSign(dictionary);
            string text = TextEncrypt.EncryptPassword(str2 + str).ToLower();

            dictionary["sign"]       = base.Request["sign"];
            dictionary["notifyType"] = base.Request["notifyType"];
            if (!(text.ToLower() == dictionary["sign"].ToLower()))
            {
                Log.Write("签名错误" + dictionary["tradeNo"]);
                base.Response.Write("签名错误");
            }
            else
            {
                ShareDetialInfo shareDetialInfo = new ShareDetialInfo();
                shareDetialInfo.OrderID   = dictionary["tradeNo"];
                shareDetialInfo.IPAddress = Utility.UserIP;
                shareDetialInfo.PayAmount = System.Convert.ToDecimal(dictionary["amount"]);
                Message message = FacadeManage.aideTreasureFacade.FilliedOnline(shareDetialInfo, 0);
                if (message.Success)
                {
                    Log.Write("充值成功" + dictionary["tradeNo"]);
                    base.Response.Write("success");
                }
                else
                {
                    Log.Write(message.Content + dictionary["tradeNo"]);
                }
            }
        }
Esempio n. 29
0
        /// <summary>
        /// 登录按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnLogon_Click(object sender, ImageClickEventArgs e)
        {
            if (TextUtility.EmptyTrimOrNull(CtrlHelper.GetText(txtAccounts)) || TextUtility.EmptyTrimOrNull(CtrlHelper.GetText(txtLogonPass)))
            {
                Show("抱歉!您输入的用户名或密码错误了。");
                this.txtLogonPass.Text = "";
                this.txtCode.Text      = "";
                return;
            }

            //验证码错误
            if (!txtCode.Text.Trim().Equals(Fetch.GetVerifyCode(), StringComparison.InvariantCultureIgnoreCase))
            {
                Show("抱歉!您输入的验证码错误了。");
                this.txtLogonPass.Text = "";
                this.txtCode.Text      = "";
                this.txtLogonPass.Focus();
                return;
            }

            Message umsg = accountsFacade.Logon(CtrlHelper.GetText(txtAccounts), CtrlHelper.GetText(txtLogonPass));

            if (umsg.Success)
            {
                UserInfo ui = umsg.EntityList[0] as UserInfo;
                ui.LogonPass = TextEncrypt.EncryptPassword(CtrlHelper.GetText(txtLogonPass));

                Fetch.SetUserCookie(ui.ToUserTicketInfo());
                if (GameRequest.GetQueryString("url") != "")
                {
                    Response.Redirect(GameRequest.GetQueryString("url"));
                }
                else
                {
                    Response.Redirect("/Member/MIndex.aspx");
                }
            }
            else
            {
                Show(umsg.Content);
            }
        }
        /// <summary>
        /// 修改其他管理员的密码
        /// </summary>
        /// <param name="admin">超级管理员</param>
        /// <param name="powerUser">修改密码的用户</param>
        /// <param name="newPasswd">新的密码</param>
        /// <returns></returns>
        public Message ModifyPowerUserLogonPass(Base_Users admin, Base_Users powerUser, string newPasswd)
        {
            if (admin.UserID != ApplicationConfig.SUPER_ADMINISTRATOR_ID ||
                admin.RoleID != ApplicationConfig.SUPER_ADMINISTRATOR_ID)
            {
                return(new Message(false, "您没有修改用户密码的权限。"));
            }

            Message msg = GameWebRules.CheckedPassword(newPasswd);

            if (!msg.Success)
            {
                return(msg);
            }

            newPasswd = TextEncrypt.EncryptPassword(newPasswd);
            aidePlatformManagerData.ModifyUserLogonPass(powerUser, newPasswd);

            return(new Message(true));
        }