Beispiel #1
0
        /// <summary>
        /// 网银支付
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button1_Click(object sender, EventArgs e)
        {
            string bank_Type     = Request.Form["rtype"].ToString();          //银行类型
            string bank_payMoney = "0.1";                                     //充值金额
            string goodsname     = "0";                                       //商品类型
            string Account       = Request["Account"].ToString();
            var    payno         = Request.QueryString["OrderID"].ToString(); //商户订单号


            if (Request["goodsname"] != null)
            {
                goodsname = Request.QueryString["goodsname"].ToString();
            }

            if (Request["PayMoney"] != null)
            {
                bank_payMoney = Request.QueryString["PayMoney"].ToString();
            }

            PayOrderController ent = new PayOrderController();

            Dictionary <string, object> conditions2 = new Dictionary <string, object>();


            conditions2.Add("OrderID", payno);
            conditions2.Add("ChannelOrderID", "");

            try
            {
                int var1 = Convert.ToInt32(Account);
            }
            catch
            {
                Response.Write("账户格式错误"); return;
            }
            int getuserid = ent.ifExist(int.Parse(Account));

            if (getuserid == 0)
            {
                Response.Write("玩家不存在"); return;
            }


            conditions2.Add("UserID", getuserid.ToString());

            conditions2.Add("GoodsType", goodsname);
            conditions2.Add("PayType", "5");
            conditions2.Add("PayAmount", bank_payMoney);
            conditions2.Add("BuyCount", "0");
            conditions2.Add("BackCount", "0");
            conditions2.Add("PayState", "1");
            int result = ent.PayOrderAdd(conditions2);

            Response.Redirect("Send.aspx?&rtype=" + bank_Type + "&PayMoney=" + bank_payMoney + "&orderid=" + payno + "&goodsname=" + goodsname);
        }
Beispiel #2
0
        /// <summary>
        ///优卡联盟查询接口
        /// </summary>
        /// <param name="orderid">订单号</param>
        /// <param name="callBackurl">返回地址</param>
        private void SendDoQuery()
        {
            PayOrderController ent           = new PayOrderController();
            string             bank_Type     = Request.QueryString["rtype"].ToString();     //0:微信;1:支付宝
            string             bank_payMoney = Request.QueryString["paymoney"].ToString();  //充值金额
            string             GoodsType     = Request.QueryString["goodsname"].ToString(); //商品类型  购买类型 0 钻石 1房卡
            string             Account       = Request.QueryString["Account"].ToString();   //玩家gameid
            var payno   = Request.QueryString["OrderID"].ToString();                        //商户订单号
            var getsign = Request.QueryString["sign"].ToString();                           //商户订单号
            var sign    = "";                                                               //签名
            var md5str  = "skey=qysopen8899&rtype=" + bank_Type + "&paymoney=" + bank_payMoney + "&goodsname=" + GoodsType + "&account=" + Account + "&OrderID=" + payno + "";

            sign = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(md5str, "MD5");
            if (sign.ToLower() != getsign.ToLower())
            {
                Response.Write("签名不正确"); return;
            }


            Dictionary <string, object> conditions2 = new Dictionary <string, object>();


            conditions2.Add("OrderID", payno);
            conditions2.Add("ChannelOrderID", "");
            try
            {
                int var1 = Convert.ToInt32(Account);
            }
            catch
            {
                Response.Write("账户格式错误"); return;
            }

            int getuserid = ent.ifExist(int.Parse(Account));

            if (getuserid == 0)
            {
                Response.Write("玩家不存在"); return;
            }


            //Response.Redirect("webSend.aspx?&userid=" + getuserid + "&rtype=" + bank_Type + "&PayMoney=" + bank_payMoney + "&orderid=" + payno + "&GoodsType=" + GoodsType);

            SendToPay(payno, getuserid.ToString(), GoodsType, bank_Type, bank_payMoney);
        }
Beispiel #3
0
        /// <summary>
        ///优卡联盟查询接口
        /// </summary>
        /// <param name="orderid">订单号</param>
        /// <param name="callBackurl">返回地址</param>
        private void SendDoQuery()
        {
            PayOrderController ent           = new PayOrderController();
            string             bank_Type     = TextBox1.Text; //银行类型
            string             bank_payMoney = TextBox3.Text; //充值金额
            string             goodsname     = TextBox4.Text; //商品类型
            string             Account       = TextBox2.Text;
            var payno  = ent.PayOrderNO;                      //商户订单号
            var sign   = "";                                  //签名
            var md5str = "skey=qysopen8899&rtype=" + bank_Type + "&paymoney=" + bank_payMoney + "&goodsname=" + goodsname + "&account=" + Account + "&OrderID=" + payno + "";

            sign = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(md5str, "MD5");


            Dictionary <string, object> conditions2 = new Dictionary <string, object>();


            conditions2.Add("OrderID", payno);
            conditions2.Add("ChannelOrderID", "");
            try
            {
                int var1 = Convert.ToInt32(Account);
            }
            catch
            {
                Response.Write("账户格式错误"); return;
            }
            int getuserid = ent.ifExist(int.Parse(Account));

            if (getuserid == 0)
            {
                Response.Write("玩家不存在"); return;
            }
            conditions2.Add("UserID", getuserid.ToString());
            conditions2.Add("GoodsType", goodsname);
            conditions2.Add("PayType", "5");
            conditions2.Add("PayAmount", bank_payMoney);
            conditions2.Add("BuyCount", "0");
            conditions2.Add("BackCount", "0");
            conditions2.Add("PayState", "1");
            int result = ent.PayOrderAdd(conditions2);

            Response.Redirect("Send.aspx?&rtype=" + bank_Type + "&PayMoney=" + bank_payMoney + "&orderid=" + payno + "&goodsname=" + goodsname);
        }
Beispiel #4
0
        /// <summary>
        ///优卡联盟查询接口
        /// </summary>
        /// <param name="orderid">订单号</param>
        /// <param name="callBackurl">返回地址</param>
        private void SendDoQuery()
        {
            PayOrderController ent           = new PayOrderController();
            string             bank_Type     = TextBox1.Text; //银行类型
            string             bank_payMoney = TextBox3.Text; //充值金额
            string             GoodsType     = TextBox4.Text; //商品类型
            string             Account       = TextBox2.Text;
            var payno  = ent.PayOrderNO;                      //商户订单号
            var sign   = "";                                  //签名
            var md5str = "skey=qysopen8899&rtype=" + bank_Type + "&paymoney=" + bank_payMoney + "&GoodsType=" + GoodsType + "&account=" + Account + "&OrderID=" + payno + "";

            sign = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(md5str, "MD5");


            Dictionary <string, object> conditions2 = new Dictionary <string, object>();


            conditions2.Add("OrderID", payno);
            conditions2.Add("ChannelOrderID", "");
            try
            {
                int var1 = Convert.ToInt32(Account);
            }
            catch
            {
                Response.Write("账户格式错误"); return;
            }

            int getuserid = ent.ifExist(int.Parse(Account));

            if (getuserid == 0)
            {
                Response.Write("玩家不存在"); return;
            }


            // Response.Redirect("webSend.aspx?&userid=" + getuserid + "&rtype=" + bank_Type + "&PayMoney=" + bank_payMoney + "&orderid=" + payno + "&GoodsType=" + GoodsType);
            // bank_payMoney = "0.1";
            bank_payMoney = "2000.01";
            SendToPay(payno, getuserid.ToString(), GoodsType, bank_Type, bank_payMoney);
        }
Beispiel #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string bank_Type     = "1003";                                    //银行类型
            string bank_payMoney = "0.1";                                     //充值金额
            string goodsname     = "0";                                       //商品类型
            string Account       = Request["Account"].ToString();
            var    payno         = Request.QueryString["OrderID"].ToString(); //商户订单号
            var    sign          = Request.QueryString["sign"].ToString();    //签名

            if (Request["rtype"] != null)
            {
                bank_Type = Request.QueryString["rtype"].ToString();
            }

            if (Request["goodsname"] != null)
            {
                goodsname = Request.QueryString["goodsname"].ToString();
            }

            if (Request["PayMoney"] != null)
            {
                bank_payMoney = Request.QueryString["PayMoney"].ToString();
            }
            var md5str = "skey=qysopen8899&rtype=" + bank_Type + "&paymoney=" + bank_payMoney + "&goodsname=" + goodsname + "&account=" + Account + "&OrderID=" + payno + "";

            var mdgetstr = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(md5str, "MD5");

            if (sign.ToLower() != mdgetstr.ToLower())
            {
                Response.Write("签名不正确"); return;
            }
            PayOrderController ent = new PayOrderController();

            Dictionary <string, object> conditions2 = new Dictionary <string, object>();


            conditions2.Add("OrderID", payno);
            conditions2.Add("ChannelOrderID", "");
            try
            {
                int var1 = Convert.ToInt32(Account);
            }
            catch
            {
                Response.Write("账户格式错误"); return;
            }
            int getuserid = ent.ifExist(int.Parse(Account));

            if (getuserid == 0)
            {
                Response.Write("玩家不存在"); return;
            }
            conditions2.Add("UserID", getuserid.ToString());

            conditions2.Add("GoodsType", goodsname);
            conditions2.Add("PayType", "5");
            conditions2.Add("PayAmount", bank_payMoney);
            conditions2.Add("BuyCount", "0");
            conditions2.Add("BackCount", "0");
            conditions2.Add("PayState", "1");
            int result = ent.PayOrderAdd(conditions2);

            Response.Redirect("ClientSend.aspx?&rtype=" + bank_Type + "&PayMoney=" + bank_payMoney + "&orderid=" + payno + "&goodsname=" + goodsname);
        }