Esempio n. 1
0
 public void ProcessRequest(HttpContext context)
 {
     if (context.Request.HttpMethod == "POST")
     {
         string  sChannle = CYRequest.GetFormString("Channel");
         string  sPhone   = CYRequest.GetFormString("Phone");
         string  sAccount = CYRequest.GetFormString("Account");
         string  sPrice   = CYRequest.GetFormString("Price");
         decimal dPrice   = 0;
         decimal.TryParse(sPrice, out dPrice);
         string sCount = CYRequest.GetFormString("Count");
         int    iCount = 0;
         int.TryParse(sCount, out iCount);
         string sGame = CYRequest.GetFormString("Game");
         string sUrl  = string.Empty;
         if (sGame == "" || sGame == "unsafe string")
         {
             sUrl = YeePayBuy.PayBegin(sChannle, sPhone, sAccount, dPrice, iCount);
         }
         else
         {
             string  sGameName  = sGame.Split('|')[0];
             string  sTranIP    = ProvideCommon.GetRealIP();
             string  sPTranID   = TransPBLL.PointSalesInit(sChannle, sPhone, sAccount, dPrice, iCount, sTranIP);//订单号
             int     iPayUserID = UserBll.UserIDSel(sAccount);
             decimal dFeeScale  = ChannelBLL.FeeScaleSel(sChannle);
             //int iPrice = Convert.ToInt32(dPrice);
             int    iGamePoints = Convert.ToInt32(dPrice * 10 * dFeeScale);
             string sGTranID    = TransGBLL.GameSalesInit(sGameName, iGamePoints, sAccount, sPhone, iPayUserID, sTranIP);
             TranQuickBLL.TranQuickAdd(sGTranID, sPTranID);
             sUrl = YeePayBuy.QuickPayBegin(sPTranID, sChannle, sAccount, dPrice, sGame);
         }
         context.Response.Redirect(sUrl, true);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// 绑定应用类型
        /// </summary>
        private void BindAppType()
        {
            List <AppTypeEntity> list = new AppTypeBLL().GetAPPTypeList(this.AppClass.Convert <int>(0));

            if (this.AppClass == "11")
            {
                this.IsNetGame.Enabled = false;
            }

            ListItem objItem = new ListItem("分类筛选", "");

            this.AppType.Items.Add(objItem);

            foreach (AppTypeEntity item in list)
            {
                this.AppType.Items.Add(new ListItem(item.AppTypeName, item.AppType.ToString()));
            }

            List <ChannelEntity> chList = new ChannelBLL().BindList();

            cbChannel.DataSource     = chList;
            cbChannel.DataTextField  = "ChannelName";
            cbChannel.DataValueField = "ChannelNo";
            cbChannel.DataBind();

            cbChannel2.DataSource     = chList;
            cbChannel2.DataTextField  = "ChannelName";
            cbChannel2.DataValueField = "ChannelNo";
            cbChannel2.DataBind();
        }
Esempio n. 3
0
        public void ChannelQr()
        {
            var rbll = new ChannelBLL();
            var a    = System.Configuration.ConfigurationSettings.AppSettings.AllKeys.Contains("Environment");

            rbll.GetInviteQrCode(1);
        }
Esempio n. 4
0
        public List <ChannelInfo> GetAllChannelLeafs(int pChnid, bool onlyCensor)
        {
            ChannelBLL         bll     = new ChannelBLL();
            List <ChannelInfo> allLeaf = new List <ChannelInfo>();

            allLeaf = bll.GetAllChannelLeafs(pChnid, onlyCensor);
            return(allLeaf);
        }
Esempio n. 5
0
        /// <summary>
        /// 绑定修改信息
        /// </summary>
        /// <param name="id"></param>
        public void Bind(int id)
        {
            ChannelEntity entity = new ChannelBLL().SelectByNo(id);

            if (entity != null)
            {
                txtChannelNO.Text    = entity.ChannelNO.ToString();
                txtChannelNO.Enabled = false;
                txtChannelName.Text  = entity.ChannelName;
                txtChannelFlag.Text  = entity.ChannelFlag;
                hidID.Value          = entity.ChannelNO.ToString();
            }
        }
Esempio n. 6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Bind();
         var a = Request.QueryString["action"];
         if (Request.QueryString["action"] == "del")
         {
             bool rult = new ChannelBLL().Delete(Convert.ToInt32(Request.QueryString["id"]));
         }
         else if (Request.QueryString["action"] == "UpdateStatus")
         {
             int  id     = Convert.ToInt32(Request.QueryString["id"]);
             int  status = Convert.ToInt32(Request.QueryString["status"]);
             bool rult   = new ChannelBLL().UpdateStatus(id, status);
         }
     }
 }
Esempio n. 7
0
        /// <summary>
        /// 新增渠道信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button1_Click(object sender, EventArgs e)
        {
            ChannelEntity entity = new ChannelEntity()
            {
                ChannelNO   = Convert.ToInt32(txtChannelNO.Text),
                ChannelName = txtChannelName.Text,
                ChannelFlag = txtChannelFlag.Text,
                Status      = 1,
                Remarks     = "",
                CreateTime  = DateTime.Now,
                UpdateTime  = DateTime.Now,
            };

            if (Convert.ToInt32(hidID.Value) > 0)
            {
                bool rult = new ChannelBLL().Update(entity);
                if (rult)
                {
                    Response.Redirect("ChannelList.aspx");
                }
                else
                {
                    Response.Write("修改失败");
                }
            }
            else
            {
                int rult = new ChannelBLL().Insert(entity);
                if (rult > 0)
                {
                    Response.Redirect("ChannelList.aspx");
                }
                else
                {
                    Response.Write("添加失败");
                }
            }
        }
Esempio n. 8
0
        /// <summary>
        /// 绑定应用类型
        /// </summary>
        private void BindAppType()
        {
            List <GroupTypeEntity> list = new GroupTypeBLL().GetDataList(this.AppClass.Convert <int>(11));

            if (this.AppClass == "11")
            {
                this.IsNetGame.Enabled = false;
            }

            ListItem objItem = new ListItem("分类筛选", "");

            this.AppType.Items.Add(objItem);

            foreach (GroupTypeEntity item in list)
            {
                if (item.TypeID == 1100 || item.TypeID == 1200)
                {
                    continue;
                }
                else
                {
                    this.AppType.Items.Add(new ListItem(item.TypeName, item.TypeID.ToString()));
                }
            }

            List <ChannelEntity> chList = new ChannelBLL().BindList();

            cbChannel.DataSource     = chList;
            cbChannel.DataTextField  = "ChannelName";
            cbChannel.DataValueField = "ChannelNo";
            cbChannel.DataBind();

            cbChannel2.DataSource     = chList;
            cbChannel2.DataTextField  = "ChannelName";
            cbChannel2.DataValueField = "ChannelNo";
            cbChannel2.DataBind();
        }
Esempio n. 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string lbVersion      = CYRequest.GetString("version");   //版本号
            string lbMerId        = CYRequest.GetString("merId");     //商户ID
            string lbPayMoney     = CYRequest.GetString("payMoney");  //支付金额
            string lbOrderId      = CYRequest.GetString("orderId");   //订单号
            string lbPayResult    = CYRequest.GetString("payResult"); //支付结果
            string lbPrivateField = CYRequest.GetString("privateField");
            string lbPayDetails   = CYRequest.GetString("payDetails");
            string lbMd5String    = CYRequest.GetString("md5String");  //MD5校验串
            string lbSignString   = CYRequest.GetString("signString"); //神州付支付系统对md5加密后的32位字符串(md5String)进行签名。

            /*
             * MD5校验
             * md5String =md5(version+merId+payMoney+orderId+payResult+privateField+payDetails+privateKey)
             */
            StringBuilder sbText = new StringBuilder();

            sbText.Append(lbVersion);
            sbText.Append(lbMerId);
            sbText.Append(lbPayMoney);
            sbText.Append(lbOrderId);
            sbText.Append(lbPayResult);
            sbText.Append(lbPrivateField);
            sbText.Append(lbPayDetails);
            sbText.Append(SzfPayBuy.GetKey());
            String md5 = ProvideCommon.MD5(sbText.ToString()).ToLower();

            if (md5.Equals(lbMd5String))
            {
                if (SzfPayBuy.veriSig(md5, lbSignString))
                {
                    if ("1".Equals(lbPayResult))
                    {
                        //支付成功
                        int     iLen     = lbPrivateField.Split('|').Length;
                        string  sAccount = lbPrivateField.Split('|')[0];                            //获取充值人账户
                        decimal dPrice   = Convert.ToDecimal(lbPayMoney) / 100;
                        int     j        = TransPBLL.PointSalesCommit(lbOrderId, sAccount, dPrice); //确认返回信息无误后提交此定单
                        if (j == 0)
                        {
                            //游戏直冲
                            if (iLen > 1)
                            {
                                TranQuickBLL.TranQuickUpdateP(lbOrderId);
                                string sGTranID   = TranQuickBLL.TranQuickGTranIDSel(lbOrderId);
                                string sGame      = lbPrivateField.Split('|')[1];
                                int    iChannelID = TransPBLL.TranPSelChannelIDByID(lbOrderId);
                                dPrice = dPrice * ChannelBLL.FeeScaleSelByID(iChannelID);
                                string sGTRes = string.Empty;
                                if (sGame.IndexOf("sq") == -1)
                                {
                                    sGTRes = PayAll.GameQuickPay(sGame, sAccount, dPrice, sGTranID);
                                }
                                else
                                {
                                    string sRoleID = lbPrivateField.Split('|')[2];
                                    sGTRes = PayAll.sqQuickPay(sGame, sAccount, dPrice, sGTranID, sRoleID);
                                }
                                if (sGTRes == "0") //游戏兑换成功
                                {
                                    TranQuickBLL.TranQuickUpdateG(sGTranID);
                                }
                            }
                        }
                    }
                    Response.Write(lbOrderId);
                }
            }
            else
            {
                Response.Write("验证失败");
            }
        }
Esempio n. 10
0
        //jelly add
        public List <int> TansforNode2Leafs(List <IntTreeNodeInfo> nodelist)
        {
            ChannelBLL bll = new ChannelBLL();

            return(bll.TansforNode2Leafs(nodelist));
        }
Esempio n. 11
0
        //jelly add
        public List <IntTreeNodeInfo> GetChannelTreeWithLeafs(int parentId, bool onlyCensor)
        {
            ChannelBLL bll = new ChannelBLL();

            return(bll.GetChannelTreeWithLeafs(parentId, onlyCensor));
        }
Esempio n. 12
0
        public void ProcessRequest(HttpContext context)
        {
            if (context.Request.HttpMethod == "POST")
            {
                string sFromHost = context.Request.UrlReferrer.Host;
                context.Response.Cookies["fromhost"].Value   = sFromHost;
                context.Response.Cookies["fromhost"].Expires = DateTime.Now.AddHours(1);
                string sAccount = CYRequest.GetFormString("quickaccount");//充值账号
                int    iUserID  = UserBll.UserIDSel(sAccount);
                if (iUserID < 1000)
                {
                    context.Response.Write("<script>alert('充值账号不存在!');</script>");
                    return;
                }

                string  sPayNums = CYRequest.GetFormString("quickpayprice");//充值金额
                decimal dPrice   = 0;
                decimal.TryParse(sPayNums, out dPrice);
                if (dPrice < 10)
                {
                    context.Response.Redirect("PayPErr.aspx?err=204");
                    return;
                }

                string sGameAbbre   = CYRequest.GetFormString("quickservername");
                string sGameIsLogin = PayAll.ValUserLoginGame(sGameAbbre, iUserID.ToString());
                if ("1" == sGameIsLogin)
                {
                    context.Response.Redirect("PayGErr.aspx?err=202");
                    return;
                }

                string sGameAbbreC = string.Empty;
                if (sGameAbbre.IndexOf("sq") == -1)
                {
                    sGameAbbreC = sGameAbbre;
                }
                else
                {
                    string sRoleID = CYRequest.GetFormString("quickrole");
                    sGameAbbreC = string.Format("{0}|{1}", sGameAbbre, sRoleID);
                }
                string sPhone    = CYRequest.GetFormString("quickphone");
                string sChannel  = CYRequest.GetFormString("quickchannel");
                int    iCount    = 1;
                string sBankName = string.Empty;
                if (sChannel == "ibank")
                {
                    sBankName = CYRequest.GetFormString("quickbank");
                }
                string sPayDirect = string.Empty;
                if (sChannel == "tenpay")
                {
                    string  sTranIP     = ProvideCommon.GetRealIP();
                    string  sPTranID    = TransPBLL.PointSalesInit(sChannel, sPhone, sAccount, dPrice, iCount, sTranIP);
                    decimal dFeeScale   = ChannelBLL.FeeScaleSel(sChannel);
                    int     iGamePoints = System.Convert.ToInt32(dPrice * 10 * dFeeScale);
                    int     iPayUserID  = UserBll.UserIDSel(sAccount);
                    string  sGTranID    = TransGBLL.GameSalesInit(sGameAbbre, iGamePoints, sAccount, sPhone, iPayUserID, sTranIP);
                    TranQuickBLL.TranQuickAdd(sGTranID, sPTranID);
                    sPayDirect = TenPayBuy.QuickPayBegin(sPTranID, sAccount, dPrice, sGameAbbreC, context);
                }
                else if (sChannel == "szfphone")
                {
                    string  sTranIP     = ProvideCommon.GetRealIP();
                    string  sPTranID    = TransPBLL.PointSalesInit(sChannel, sPhone, sAccount, dPrice, iCount, sTranIP);
                    decimal dFeeScale   = ChannelBLL.FeeScaleSel(sChannel);
                    int     iGamePoints = System.Convert.ToInt32(dPrice * 10 * dFeeScale);
                    int     iPayUserID  = UserBll.UserIDSel(sAccount);
                    string  sGTranID    = TransGBLL.GameSalesInit(sGameAbbre, iGamePoints, sAccount, sPhone, iPayUserID, sTranIP);
                    TranQuickBLL.TranQuickAdd(sGTranID, sPTranID);
                    string cardTypeCombine = CYRequest.GetFormString("quickcardTypeCombine");
                    sPayDirect = SzfPayBuy.QuickPayBegin(sPTranID, sAccount, dPrice, sGameAbbreC, "0", cardTypeCombine);
                }
                else
                {
                    sPayDirect = PayAll.QuickPay(sChannel, sPhone, sAccount, dPrice, iCount, sBankName, sGameAbbreC);
                }
                context.Response.Write(sPayDirect);
            }
        }
Esempio n. 13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string lbVersion      = CYRequest.GetString("version");   //版本号
            string lbMerId        = CYRequest.GetString("merId");     //商户ID
            string lbPayMoney     = CYRequest.GetString("payMoney");  //支付金额
            string lbOrderId      = CYRequest.GetString("orderId");   //订单号
            string lbPayResult    = CYRequest.GetString("payResult"); //支付结果
            string lbPrivateField = CYRequest.GetString("privateField");
            string lbPayDetails   = CYRequest.GetString("payDetails");
            string lbMd5String    = CYRequest.GetString("md5String");  //MD5校验串
            string lbSignString   = CYRequest.GetString("signString"); //神州付支付系统对md5加密后的32位字符串(md5String)进行签名。

            /*
             * MD5校验
             * md5String =md5(version+merId+payMoney+orderId+payResult+privateField+payDetails+privateKey)
             */
            StringBuilder sbText = new StringBuilder();

            sbText.Append(lbVersion);
            sbText.Append(lbMerId);
            sbText.Append(lbPayMoney);
            sbText.Append(lbOrderId);
            sbText.Append(lbPayResult);
            sbText.Append(lbPrivateField);
            sbText.Append(lbPayDetails);
            sbText.Append(SzfPayBuy.GetKey());
            String md5 = ProvideCommon.MD5(sbText.ToString()).ToLower();

            if (md5.Equals(lbMd5String))
            {
                if (SzfPayBuy.veriSig(md5, lbSignString))
                {
                    if ("1".Equals(lbPayResult))
                    {
                        //支付成功
                        int     iLen     = lbPrivateField.Split('|').Length;
                        string  sAccount = lbPrivateField.Split('|')[0];                            //获取充值人账户
                        decimal dPrice   = Convert.ToDecimal(lbPayMoney) / 100;
                        int     j        = TransPBLL.PointSalesCommit(lbOrderId, sAccount, dPrice); //确认返回信息无误后提交此定单
                        if (j == 0)
                        {
                            //游戏直冲
                            if (iLen > 1)
                            {
                                TranQuickBLL.TranQuickUpdateP(lbOrderId);
                                string sGTranID   = TranQuickBLL.TranQuickGTranIDSel(lbOrderId);
                                int    iChannelID = TransPBLL.TranPSelChannelIDByID(lbOrderId);
                                dPrice = dPrice * ChannelBLL.FeeScaleSelByID(iChannelID);
                                string sGame  = lbPrivateField.Split('|')[1];
                                string sGTRes = string.Empty;
                                if (sGame.IndexOf("sq") == -1)
                                {
                                    sGTRes = PayAll.GameQuickPay(sGame, sAccount, dPrice, sGTranID);
                                }
                                else
                                {
                                    string sRoleID = lbPrivateField.Split('|')[2];
                                    sGTRes = PayAll.sqQuickPay(sGame, sAccount, dPrice, sGTranID, sRoleID);
                                }
                                if (sGTRes == "0") //游戏兑换成功
                                {
                                    TranQuickBLL.TranQuickUpdateG(sGTranID);
                                    Response.Redirect(string.Format("PayGSucc.aspx?TranID={0}&gn={1}&type=q", sGTranID, sGame), false);
                                }
                                else
                                {
                                    //sMsg = "<script>alert('充值武林币成功!游戏兑换失败!如有问题请与客服联系!');</script>";
                                    Response.Redirect(string.Format("PayPErr.aspx?err=102&gtres={0}", sGTRes));
                                }
                            }
                            else if (1 == iLen)
                            {
                                Response.Redirect(string.Format("PayPSucc.aspx?TranID={0}", lbOrderId));    //转向银行卡支付成功页面
                            }
                        }
                        else
                        {
                            if (6 == j)
                            {
                                if (iLen > 1)
                                {
                                    string sQuickState = TranQuickBLL.TransQuickStateSelByP(lbOrderId);
                                    string sGTranID    = TranQuickBLL.TranQuickGTranIDSel(lbOrderId);
                                    string sGame       = lbPrivateField.Split('|')[1];
                                    if (sQuickState == "2")
                                    {
                                        Response.Redirect(string.Format("PayGSucc.aspx?TranID={0}&gn={1}&type=q", sGTranID, sGame), false);
                                    }
                                    else if (sQuickState == "1")
                                    {
                                        int iChannelID = TransPBLL.TranPSelChannelIDByID(lbOrderId);
                                        dPrice = dPrice * ChannelBLL.FeeScaleSelByID(iChannelID);
                                        string sGTRes = string.Empty;
                                        if (sGame.IndexOf("sq") == -1)
                                        {
                                            sGTRes = PayAll.GameQuickPay(sGame, sAccount, dPrice, sGTranID);
                                        }
                                        else
                                        {
                                            string sRoleID = lbPrivateField.Split('|')[2];
                                            sGTRes = PayAll.sqQuickPay(sGame, sAccount, dPrice, sGTranID, sRoleID);
                                        }
                                        if (sGTRes == "0") //游戏兑换成功
                                        {
                                            TranQuickBLL.TranQuickUpdateG(sGTranID);
                                            Response.Redirect(string.Format("PayGSucc.aspx?TranID={0}&gn={1}&type=q", sGTranID, sGame), false);
                                        }
                                        else
                                        {
                                            //sMsg = "<script>alert('充值武林币成功!游戏兑换失败!如有问题请与客服联系!');</script>";
                                            Response.Redirect(string.Format("PayPErr.aspx?err=102&gtres={0}", sGTRes));
                                        }
                                    }
                                }
                                else
                                {
                                    Response.Redirect(string.Format("PayPSucc.aspx?TranID={0}", lbOrderId));
                                }
                            }
                            else
                            {
                                //sMsg = "<script>alert('订单提交失败!如有问题请与客服联系!');</script>";
                                Response.Redirect("PayPErr.aspx?err=101");
                            }
                        }
                    }
                    else
                    {
                        //支付失败
                        //sMsg = "<script>alert('支付失败!如有问题请与客服联系!');</script>";
                        Response.Redirect("PayPErr.aspx?err=104");
                    }
                }
            }
            else
            {
                //sMsg = "<script>alert('验证失败!如有问题请与客服联系!');</script>";
                Response.Redirect("PayPErr.aspx?err=103");
            }
        }