示例#1
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        key      = "76ju^j*3Hi2";
            string        agentid  = "29";
            string        serverid = "S" + GetServerID(sGame);
            StringBuilder sbText   = new StringBuilder();

            sbText.Append(sUserID);
            sbText.Append(dMoney);
            sbText.Append(sOrderID);
            sbText.Append(serverid);
            sbText.Append(key);
            string iSActive = ActiveUser(sUserID, serverid, agentid);

            if (iSActive == "0")
            {
                return("3");
            }
            string sign     = ProvideCommon.MD5(sbText.ToString());//sign=md5($uid.$order_amount.$order_id.$server_id.$key);
            string sTranUrl = string.Format("http://domestic.naruto.gametrees.com/api/dao50/payment.php?uid={0}&order_amount={1}&order_id={2}&server_id={3}&sign={4}&agentid=29",
                                            sUserID, dMoney, sOrderID, serverid, sign);
            string sRes    = ProvideCommon.GetPageInfo(sTranUrl);
            string user_ip = ProvideCommon.GetRealIP();
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            GamePayBLL.GamePayAdd(user_ip, sTranUrl, sOrderID, sRes, sGame, iUserID);

            return(sRes);
        }
示例#2
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        sServerID = GetServerID(sGame);
            string        money     = dMoney.ToString();
            string        gold      = Convert.ToInt32(dMoney * 10).ToString();
            string        key       = "dao50_df545dfg43_3s435csdf34";
            string        time      = ProvideCommon.getTime().ToString();
            StringBuilder sbText    = new StringBuilder();

            sbText.Append(sOrderID);
            sbText.Append(sUserID);
            sbText.Append(gold);
            sbText.Append(money);
            sbText.Append(time);
            sbText.Append(key);
            string flag = ProvideCommon.MD5(sbText.ToString());//md5(orderid + username + gold + money + time + 密钥)

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("http://s{0}.txj.dao50.com/game/api/pay.php", sServerID);
            sbText.AppendFormat("?orderid={0}", sOrderID);
            sbText.AppendFormat("&username={0}", sUserID);
            sbText.AppendFormat("&gold={0}", gold);
            sbText.AppendFormat("&money={0}", money);
            sbText.AppendFormat("&time={0}", time);
            sbText.AppendFormat("&flag={0}", flag);
            sbText.AppendFormat("&channel={0}", "");
            string sRes    = ProvideCommon.GetPageInfo(sbText.ToString());
            string user_ip = ProvideCommon.GetRealIP();
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            GamePayBLL.GamePayAdd(user_ip, sbText.ToString(), sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
示例#3
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame, string playerId)
        {
            string        yx        = "dao50";//运营商标识
            string        userid    = sUserID;
            string        sTranTime = TransGBLL.TransTimeSelByTID(sOrderID);
            string        orderId   = ProvideCommon.getTime(DateTime.Parse(sTranTime)).ToString();
            int           iGold     = Convert.ToInt32(dMoney * 10);
            string        gold      = iGold.ToString();
            string        tp        = ProvideCommon.getTime().ToString();
            string        payKey    = "##$~@@(dao50::PAY)@@RMd3YAtihg5GhO6LsU";
            StringBuilder sbText    = new StringBuilder();

            sbText.Append(yx);
            sbText.Append(userid);
            sbText.Append(orderId);
            sbText.Append(gold);
            sbText.Append(tp);
            sbText.Append(payKey);
            string ticket      = ProvideCommon.MD5(sbText.ToString());//yx+userId+orderId+gold+tp+payKey
            string sGamePayUrl = string.Format("http://{0}/yx/pay?yx={1}&userId={2}&playerId={3}&orderId={4}&gold={5}&tp={6}&ticket={7}",
                                               ServerHost(sGame), yx, userid, playerId, orderId, gold, tp, ticket);
            string sRes    = ProvideCommon.GetPageInfo(sGamePayUrl);
            string sTranIP = ProvideCommon.GetRealIP();
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            GamePayBLL.GamePayAdd(sTranIP, sGamePayUrl, sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
示例#4
0
        public static string Pay(string sUserID, int iMoney, string sOrderID, string sGame)
        {
            string        serial_id     = string.Format("{0}{1}", sp_id, sOrderID.Substring(0, 20));
            string        ctime         = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            int           point         = iMoney * 10;//游戏虚拟货币数量
            string        user_ip       = ProvideCommon.GetRealIP();
            string        target_game   = "3";
            string        prizeServerId = ServerName(sGame);//区服编号
            string        pay_key       = "0346857442528289273";
            StringBuilder sbText        = new StringBuilder();

            sbText.AppendFormat("{0}|{1}|{2}|{3}|{4}|{5}|{6}", sUserID, serial_id, point, ctime, sp_id, user_ip, pay_key);
            string sign_str = ProvideCommon.MD5(sbText.ToString());//MD5(user_id|serial_id|point|ctime|spid|user_ip|pay_key)

            sbText.Remove(0, sbText.Length);
            string TranURL = "http://pay.bluepanda.cn/charge/cooperateExchange.action";

            sbText.AppendFormat("spid={0}&user_id={1}&serial_id={2}&point={3}&ctime={4}", sp_id, sUserID, serial_id, point.ToString(), HttpUtility.UrlEncode(ctime));
            sbText.AppendFormat("&user_ip={0}&target_game={1}&prizeServerId={2}&sign_str={3}", user_ip, target_game, prizeServerId, sign_str);
            string sRes    = ProvideCommon.GetPageInfoByPost(TranURL, sbText.ToString(), "UTF-8");
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            string sUrl = string.Format("{0}?{1}", TranURL, sbText.ToString());

            GamePayBLL.GamePayAdd(user_ip, sUrl, sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
示例#5
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        user   = sUserID;
            string        time   = ProvideCommon.getTime().ToString(); //标准时间戳
            string        order  = sOrderID;
            int           gold   = Convert.ToInt32((dMoney * 100));    //充值银两,比例1:100,即1RMB=100gold
            StringBuilder sbText = new StringBuilder();

            sbText.Append(user);
            sbText.AppendFormat("_{0}_", time);
            sbText.AppendFormat("{0}_", order);
            sbText.AppendFormat("{0}_", gold);
            sbText.Append(key);
            string sign = ProvideCommon.MD5(sbText.ToString());//sign的值为user,time,order,gold,密钥这5个参数用下划线拼接后md5值

            sbText.Remove(0, sbText.Length);
            string serverdomain = GetDomain(sGame);
            string TranURL      = string.Format("http://{0}/api/charge", serverdomain);

            sbText.AppendFormat("user={0}&", user);
            sbText.AppendFormat("time={0}&", time);
            sbText.AppendFormat("order={0}&", sOrderID);
            sbText.AppendFormat("gold={0}&", gold);
            sbText.AppendFormat("sign={0}", sign);
            string sRes    = ProvideCommon.GetPageInfoByPost(TranURL, sbText.ToString(), "UTF-8");
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            string sUrl    = string.Format("{0}?{1}", TranURL, sbText.ToString());
            string user_ip = ProvideCommon.GetRealIP();

            GamePayBLL.GamePayAdd(user_ip, sUrl, sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
示例#6
0
        public static string Pay(string sUserID, int iMoney, string sOrderID, string sGame)
        {
            string        sUnion      = "dao50";
            string        sKey        = "DBKJWY¥%@&*dkhwpd&###skSBNK";
            string        sGamePayUrl = "http://pay.union.qq499.com:8029/api/sp/pay_sync_asqx.php";
            string        server      = ServerName(sGame);
            long          lTime       = (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000;
            string        sGTranID    = sOrderID.Substring(0, 30);
            StringBuilder sbText      = new StringBuilder();

            sbText.Append(sUserID);
            sbText.Append(sUnion);
            sbText.Append(iMoney.ToString());
            sbText.Append(sGTranID);
            sbText.Append(server);
            sbText.Append(lTime);
            sbText.Append(sKey);

            string sSign = Common.ProvideCommon.MD5(sbText.ToString());//sign = md5($username . $union . $money . $order . $server . $time . $key)

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("union={0}&username={1}&order={2}&money={3}&server={4}&time={5}&sign={6}", sUnion, sUserID, sGTranID, iMoney.ToString(), server, lTime.ToString(), sSign);
            string sRes    = ProvideCommon.GetPageInfoByPost(sGamePayUrl, sbText.ToString(), "UTF-8");
            string sTranIP = ProvideCommon.GetRealIP();
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            string sUrl = string.Format("{0}?{1}", sGamePayUrl, sbText.ToString());

            GamePayBLL.GamePayAdd(sTranIP, sUrl, sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
示例#7
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        server_id = GetServerID(sGame);
            string        time      = ProvideCommon.getTime().ToString();
            int           iMoney    = Convert.ToInt32(dMoney);
            string        money     = iMoney.ToString();
            string        gold      = (iMoney * 10).ToString();
            string        sPayKey   = "qPVrR2gxPtdCZ6zL4EzK5EPmYYopUKXG";
            StringBuilder sbText    = new StringBuilder();

            sbText.AppendFormat("{0}{1}{2}{3}{4}{5}{6}", sOrderID, sUserID, server_id, money, gold, time, sPayKey);
            string sign = ProvideCommon.MD5(sbText.ToString()).ToLower();//md5(orderid + user + server + money + gold + time + 密钥)

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("http://pay.zhuqueok.com:8088/api/daoWLCharge.do?orderid={0}&user={1}&gold={2}&money={3}&time={4}&sign={5}&server={6}",
                                sOrderID, sUserID, gold, money, time, sign, server_id);
            string sRes    = ProvideCommon.GetPageInfo(sbText.ToString());
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            string user_ip = ProvideCommon.GetRealIP();

            GamePayBLL.GamePayAdd(user_ip, sbText.ToString(), sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
示例#8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (LoginSessionVal() || isLoginCookie())
            {
                string sGameAbbre = CYRequest.GetString("gn");
                if (!ProvideCommon.valTime(DateTime.Now.ToString(), ServerBLL.ServerTimeSel(sGameAbbre)))
                {
                    Response.Write("<script>alert('即将开服,敬请期待!');location.href='jycl.aspx';</script>");
                    return;
                }
                int      iUserID     = GetUserID();
                DateTime dtLoginTime = GetLoginTime();
                if (!PWDUpdateBLL.PwdUpdateVal(iUserID, dtLoginTime))
                {
                    ClearUsersInfo();
                    string sJs = "<script>alert('密码已改,请重新登陆!');location.href='jyc.html';</script>";
                    Response.Write(sJs);
                    return;
                }
                string sClient = "pc";
                string sUrl    = jyGame.Login(iUserID.ToString(), sGameAbbre, sClient);
                if (GameLogin(sGameAbbre))
                {
                    GameLoginBLL.GameLoginAdd(iUserID, sGameAbbre, ProvideCommon.GetRealIP(), sUrl);
                }


                Response.Redirect(sUrl, true);
                return;
            }
            else
            {
                Server.Transfer("jycl.aspx", false);
            }
        }
示例#9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (LoginSessionVal() || isLoginCookie())
     {
         string sGameAbbre = CYRequest.GetString("gn");
         if (!ProvideCommon.valTime(DateTime.Now.ToString(), ServerBLL.ServerTimeSel(sGameAbbre)))
         {
             Response.Write("1");
             return;
         }
         int iUserID = GetUserID();
         if (iUserID > 999)
         {
             string sUserID       = iUserID.ToString();
             string sGameLoginUrl = string.Format("app://loadgame:{0},{1}|{2}&from_launcher=1", sUserID, sGameAbbre, sjsgGame.Login(sUserID, sGameAbbre));
             if (GameLogin(sGameAbbre))
             {
                 GameLoginBLL.GameLoginAdd(iUserID, sGameAbbre, ProvideCommon.GetRealIP(), sGameLoginUrl);
             }
             Response.Write(sGameLoginUrl);
         }
     }
     else
     {
         Response.Write("2");
     }
 }
示例#10
0
 public static string Pay(string sUserID, int iMoney, string sOrderID, string sGame)
 {
     string SECURITY_TICKET_PAY = "dao50dfvq34WUIOQRFl9HzbsdiKWQcBri2t465346df2h345I2u";
     string orderid = sOrderID;
     string loginname = sUserID;
     int golden = iMoney*10;
     string tstamp = ProvideCommon.getTime().ToString();//标准时间戳
     string order = sOrderID;
     StringBuilder sbText = new StringBuilder();
     sbText.Append(SECURITY_TICKET_PAY);
     sbText.Append(orderid);
     sbText.Append(loginname);
     sbText.Append(golden);
     sbText.Append(tstamp);
     string ticket = ProvideCommon.MD5(sbText.ToString());//ticket = md5(SECURITY_TICKET_PAY +orderid + loginname + golden + tstamp);
     sbText.Remove(0, sbText.Length);
     string serverdomain = getPayDomain(sGame);
     sbText.AppendFormat("http://{0}/ops/addpay?", serverdomain);
     sbText.AppendFormat("loginname={0}&", loginname);
     sbText.AppendFormat("orderid={0}&", orderid);
     sbText.AppendFormat("golden={0}&", golden);
     sbText.AppendFormat("tstamp={0}&", tstamp);
     sbText.AppendFormat("ticket={0}", ticket);
     string sTranURL = sbText.ToString();
     string sRes = ProvideCommon.GetPageInfo(sTranURL);
     int iUserID = 0;
     int.TryParse(sUserID, out iUserID);
     string user_ip = ProvideCommon.GetRealIP();
     GamePayBLL.GamePayAdd(user_ip, sTranURL, sOrderID, sRes, sGame, iUserID);
     return sRes;
 }
示例#11
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        sServerID = GetServerID(sGame);
            string        rmb       = dMoney.ToString();
            string        fee       = Convert.ToInt32(dMoney * 10).ToString();
            string        code      = string.Format("dao50s{0}", sServerID);//充值目标服务器标识
            string        key       = "caf578020f0799051436020954711c8e";
            string        time      = ProvideCommon.getTime().ToString();
            StringBuilder sbText    = new StringBuilder();

            sbText.Append(sOrderID);
            sbText.Append(sUserID);
            sbText.Append(fee);
            sbText.Append(code);
            sbText.Append(time);
            sbText.Append(key);
            string sign = ProvideCommon.MD5(sbText.ToString());//MD5(ono+account+fee+code+time+密钥)

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("http://183.61.84.210:8081/charge.do?ono={0}", sOrderID);
            sbText.AppendFormat("&account={0}", sUserID);
            sbText.AppendFormat("&rmb={0}", rmb);
            sbText.AppendFormat("&fee={0}", fee);
            sbText.AppendFormat("&code={0}", code);
            sbText.AppendFormat("&sign={0}", sign);
            sbText.AppendFormat("&time={0}", time);
            string sRes    = ProvideCommon.GetPageInfo(sbText.ToString());
            string user_ip = ProvideCommon.GetRealIP();
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            GamePayBLL.GamePayAdd(user_ip, sbText.ToString(), sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
示例#12
0
        public static string gcldPay(string sGameAbbre, int iUserID, string sUserName, int iPayPoints, string sPhone, int iGUserID)
        {
            string  sPlayerID = GetPlayID(iGUserID.ToString(), sGameAbbre);
            decimal dMoney    = (Convert.ToDecimal(iPayPoints)) / 10;
            string  sTranIP   = ProvideCommon.GetRealIP();
            string  sTranID   = TransGBLL.GameSalesInit(sGameAbbre, iPayPoints, sUserName, sPhone, iGUserID, sTranIP);
            string  sTGRes    = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre).ToString();

            if (sTGRes != "0")
            {
                return(sTGRes);
            }
            string sRes    = Pay(iGUserID.ToString(), dMoney, sTranID, sGameAbbre, sPlayerID);
            string sReturn = string.Empty;

            if (sRes == "{\"state\":1,\"data\":1}" || sRes == "{\"state\":0,\"data\":5}")
            {
                sReturn = string.Format("0|{0}", sTranID);
            }
            else
            {
                sReturn = sRes;
            }
            return(sReturn);
        }
示例#13
0
        public static string yqdxPay(string sGameAbbre, int iUserID, string sUserName, int iPayPoints, string sPhone, int iGUserID)
        {
            int    iMoney  = iPayPoints / 10;
            string sTranIP = ProvideCommon.GetRealIP();
            string sTranID = TransGBLL.GameSalesInit(sGameAbbre, iPayPoints, sUserName, sPhone, iGUserID, sTranIP);
            string sTGRes  = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre).ToString();

            if (sTGRes != "0")
            {
                return(sTGRes);
            }
            string otype   = "1";//订单类型(0,直接充值,1虚拟币兑换)
            string sRes    = Pay(iGUserID.ToString(), iMoney, sTranID, sGameAbbre, sTranIP, otype);
            string sReturn = string.Empty;

            switch (sRes)
            {
            case "1":
                sReturn = string.Format("0|{0}", sTranID);
                break;

            default:
                sReturn = sRes;
                break;
            }
            return(sReturn);
        }
示例#14
0
        protected string CodeTake(string sServerAbbre, string sCodeType, int iUserID)
        {
            int           iCodeCount = GameCodeBLL.GameCodeCountSel(sServerAbbre, sCodeType);
            StringBuilder sbText     = new StringBuilder();

            if (iCodeCount > 0)
            {
                string sCode = GameCodeBLL.GameCodeSelByUserID(sServerAbbre, sCodeType, iUserID);
                if (sCode.Length > 1)
                {
                    sbText.AppendFormat("3|{0}", sCode);
                }
                else
                {
                    //获取激活码
                    string sIP  = ProvideCommon.GetRealIP();
                    string sRes = GameCodeBLL.GameCodeGet(sServerAbbre, iUserID, sCodeType, sIP);
                    if (sRes.Length > 1)
                    {
                        sbText.AppendFormat("0|{0}", sRes);
                    }
                    else
                    {
                        sbText.Append(sRes);
                    }
                }
            }
            else
            {
                sbText.Append("4");
            }
            return(sbText.ToString());
        }
示例#15
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (LoginSessionVal() || isLoginCookie())
     {
         string sGameAbbre = CYRequest.GetString("gn");
         if (!ProvideCommon.valTime(DateTime.Now.ToString(), ServerBLL.ServerTimeSel(sGameAbbre)))
         {
             Response.Write("<script>alert('即将开服,敬请期待!');location.href='ahxycl.aspx';</script>");
             return;
         }
         int iUserID = GetUserID();
         if (iUserID > 999)
         {
             string sUserID       = iUserID.ToString();
             string sServerID     = sGameAbbre.Replace("ahxy", "");
             string sServerName   = ServerBLL.ServerNameSelByAbbre(sGameAbbre);
             string sGameLoginUrl = string.Format("app://loadgame:{0}服-{1}-{2}|{3}&from_launcher=1",
                                                  sServerID, sServerName, sUserID, ahxyGame.Login(sUserID, sGameAbbre));
             if (GameLogin(sGameAbbre))
             {
                 GameLoginBLL.GameLoginAdd(iUserID, sGameAbbre, ProvideCommon.GetRealIP(), sGameLoginUrl);
             }
             Response.Write(string.Format("<script>window.location ='{0}';</script>", sGameLoginUrl));
         }
     }
     else
     {
         Response.Write("<script>alert('用户状态不存在,请登陆!');location.href='ahxycl.aspx';</script>");
         return;
     }
 }
示例#16
0
        public static string jyPay(string sGameAbbre, int iUserID, string sUserName, int iPayPoints, string sPhone, int iGUserID)
        {
            decimal dMoney  = (Convert.ToDecimal(iPayPoints)) / 10;
            string  sTranIP = ProvideCommon.GetRealIP();
            string  sTranID = TransGBLL.GameSalesInit(sGameAbbre, iPayPoints, sUserName, sPhone, iGUserID, sTranIP);
            string  sTGRes  = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre).ToString();

            if (sTGRes != "0")
            {
                return(sTGRes);
            }
            string sRes    = Pay(iGUserID.ToString(), dMoney, sTranID, sGameAbbre);
            string sReturn = string.Empty;
            string intRes  = ProvideCommon.getJsonValue("status", sRes).Trim();

            if (intRes == "1")
            {
                sReturn = string.Format("0|{0}", sTranID);
            }
            else
            {
                sReturn = sRes;
            }
            return(sReturn);
        }
示例#17
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        server_id    = GetServerID(sGame);
            string        time         = ProvideCommon.getTime().ToString();
            string        order_amount = dMoney.ToString();
            string        pid          = "39";
            string        sPayKey      = "SRWSE9346ksdhfqweigLVL49dfg445";
            string        order_id     = sOrderID;
            StringBuilder sbText       = new StringBuilder();

            sbText.AppendFormat("qid={0}", sUserID);
            sbText.AppendFormat("&order_amount={0}", order_amount);
            sbText.AppendFormat("&order_id={0}", order_id);
            sbText.AppendFormat("&time={0}", time);
            sbText.AppendFormat("&server_id={0}", server_id);
            sbText.AppendFormat("&pid={0}", pid);
            sbText.AppendFormat("&key={0}", sPayKey);
            string sign = ProvideCommon.MD5(sbText.ToString());//md5(“qid=”+$qid+”&order_amount=”+$order_amount+”&order_id=”+$order_id+”&time=”+$time+”&server_id=”+$server_id+”&pid=”+$pid+”&key=”+$key)

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("http://s{0}.wssg.dao50.com/wssg/recharge?qid={1}&order_amount={2}&order_id={3}&time={4}&server_id={0}&pid={5}&sign={6}",
                                server_id, sUserID, order_amount, order_id, time, pid, sign);
            string sRes    = ProvideCommon.GetPageInfo(sbText.ToString());
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            string user_ip = ProvideCommon.GetRealIP();

            GamePayBLL.GamePayAdd(user_ip, sbText.ToString(), sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
示例#18
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string op_id      = "115";
            string sid        = GetServerID(sGame);
            string account    = sUserID;
            int    iMoney     = Convert.ToInt32(dMoney);
            int    iGameMoney = iMoney * 10;
            //int iGameMoney = Convert.ToInt32(dMoney * 10);
            string game_money = iGameMoney.ToString();
            string u_money    = iMoney.ToString();
            string time       = ProvideCommon.getTime().ToString();
            string sAuth      = string.Format("op_id={0}&sid={1}&game_id=36&account={2}&order_id={3}&game_money={4}&u_money={5}&time={6}",
                                              op_id, sid, account, sOrderID, game_money, u_money, time);
            string sBase64Auth = Base64.EncodeBase64(sAuth);
            string sVerify     = ProvideCommon.MD5(string.Format("{0}{1}", sBase64Auth, key));
            string sPayUrl     = string.Format("http://up.uuzu.com/api/commonAPI/charge?auth={0}&verify={1}", sBase64Auth, sVerify);
            string sRes        = ProvideCommon.GetPageInfo(sPayUrl);
            string user_ip     = ProvideCommon.GetRealIP();
            int    iUserID     = 0;

            int.TryParse(sUserID, out iUserID);
            GamePayBLL.GamePayAdd(user_ip, sPayUrl, sOrderID, sRes, sGame, iUserID);
            string sCode = ProvideCommon.getJsonValue("status", sRes);

            return(sCode);
        }
示例#19
0
        public static string zsgPay(string sGameAbbre, int iUserID, string sUserName, int iPayPoints, string sPhone, int iGUserID)
        {
            decimal dMoney  = Convert.ToDecimal(iPayPoints / 10);
            string  sTranIP = ProvideCommon.GetRealIP();
            string  sTranID = TransGBLL.GameSalesInit(sGameAbbre, iPayPoints, sUserName, sPhone, iGUserID, sTranIP);
            string  sTGRes  = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre).ToString();

            if (sTGRes != "0")
            {
                return(sTGRes);
            }
            string sRes    = Pay(iGUserID.ToString(), dMoney, sTranID, sGameAbbre);
            string sReturn = string.Empty;

            switch (sRes)
            {
            case "1":
            case "-6":
                sReturn = string.Format("0|{0}", sTranID);
                break;

            default:
                sReturn = sRes;
                break;
            }
            return(sReturn);
        }
示例#20
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        SECURITY_TICKET_PAY = "59cffe0f86ceb8bda13947b277f47ddc";
            int           golden   = Convert.ToInt32(dMoney) * 10;
            string        tstamp   = ProvideCommon.getTime().ToString();
            string        serverid = GetServerID(sGame);
            StringBuilder sbText   = new StringBuilder();

            sbText.Append(SECURITY_TICKET_PAY);
            sbText.AppendFormat("golden{0}", golden);
            sbText.AppendFormat("loginname{0}", sUserID);
            sbText.AppendFormat("orderid{0}", sOrderID);
            sbText.AppendFormat("serverid{0}", serverid);
            sbText.AppendFormat("tstamp{0}", tstamp);
            string ticket  = ProvideCommon.MD5(sbText.ToString());
            string TranURL = string.Format("http://s{0}.khbd.dao50.com:9130/ops/addpay/ops/addpay", serverid);

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("orderid={0}&loginname={1}&golden={2}&tstamp={3}&ticket={4}&serverid={5}",
                                sOrderID, sUserID, golden, tstamp, ticket, serverid);
            string sRes    = ProvideCommon.GetPageInfoByPost(TranURL, sbText.ToString(), "UTF-8");
            string user_ip = ProvideCommon.GetRealIP();
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            string sUrl = string.Format("{0}?{1}", TranURL, sbText.ToString());

            GamePayBLL.GamePayAdd(user_ip, sUrl, sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
示例#21
0
        public static string khbdPay(string sGameAbbre, int iUserID, string sUserName, int iPayPoints, string sPhone, int iGUserID)
        {
            int    iMoney  = iPayPoints / 10;
            string sTranIP = ProvideCommon.GetRealIP();
            string sTranID = TransGBLL.GameSalesInit(sGameAbbre, iPayPoints, sUserName, sPhone, iGUserID, sTranIP);
            string sTGRes  = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre).ToString();

            if (sTGRes != "0")
            {
                return(sTGRes);
            }
            string sRes     = Pay(iGUserID.ToString(), iMoney, sTranID, sGameAbbre);
            string sPayCode = ProvideCommon.getJsonValue("code", sRes);
            string sReturn  = string.Empty;

            if (sPayCode == "0" || sPayCode == "2")
            {
                sReturn = string.Format("0|{0}", sTranID);
            }
            else
            {
                sReturn = sRes;
            }
            return(sReturn);
        }
示例#22
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);
     }
 }
示例#23
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        spid     = "dao50";//平台id
            string        gameid   = "4";
            string        serverid = GetServerID(sGame);
            string        key      = "qrEyrtZc9aBW0z5i";
            int           iMoney   = Convert.ToInt32(dMoney * 100);//单位:分
            string        user_ip  = ProvideCommon.GetRealIP();
            string        ctime    = ProvideCommon.getTime().ToString();
            string        orderid  = sOrderID.Substring(0, 32);
            StringBuilder sbText   = new StringBuilder();

            sbText.AppendFormat("{0}|", spid);
            sbText.AppendFormat("{0}|", gameid);
            sbText.AppendFormat("{0}|", serverid);
            sbText.AppendFormat("{0}|", sUserID);
            sbText.AppendFormat("{0}|", orderid);
            sbText.AppendFormat("{0}|", iMoney.ToString());
            sbText.AppendFormat("{0}|", user_ip);
            sbText.AppendFormat("{0}|", ctime);
            sbText.Append(key);
            string sign = ProvideCommon.MD5(sbText.ToString()).ToLower();//md5(spid|gameid|serverid|userid|orderid|money|userip|ctime|key)
            string sUrl = string.Format("http://mid.gamefy.cn/union_mid/charge?userid={0}&spid={1}&gameid={2}&serverid={3}&orderid={4}&money={5}&userip={6}&ctime={7}&sign={8}",
                                        sUserID, spid, gameid, serverid, orderid, iMoney.ToString(), user_ip, ctime, sign);
            string sRes    = ProvideCommon.GetPageInfo(sUrl.ToString());
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            GamePayBLL.GamePayAdd(user_ip, sUrl, sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
示例#24
0
        public static string sgljPay(string sGameAbbre, int iUserID, string sUserName, int iPayPoints, string sPhone, int iGUserID)
        {
            int    iMoney  = iPayPoints / 10;
            string sTranIP = ProvideCommon.GetRealIP();
            string sTranID = TransGBLL.GameSalesInit(sGameAbbre, iPayPoints, sUserName, sPhone, iGUserID, sTranIP);
            string sTGRes  = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre).ToString();

            if (sTGRes != "0")
            {
                return(sTGRes);
            }
            string sRes = Pay(iGUserID.ToString(), iMoney, sTranID, sGameAbbre);

            ///成功返回0|订单号,失败返回游戏失败结果
            string sReturn = string.Empty;

            switch (sRes)
            {
            case "0":
            case "-6":
                sReturn = string.Format("0|{0}", sTranID);
                break;

            default:
                sReturn = sRes;
                break;
            }
            return(sReturn);
        }
示例#25
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        user   = sUserID;
            string        order  = sOrderID;
            int           gold   = Convert.ToInt32((dMoney * 10));//充值元宝,比例1:10,即1RMB=10元宝
            string        domain = GetDomain(sGame);
            StringBuilder sbText = new StringBuilder();

            sbText.Append(user);
            sbText.AppendFormat("_{0}_", gold);
            sbText.AppendFormat("{0}_", order);
            sbText.AppendFormat("{0}_", domain);
            sbText.Append(key);
            string sign = ProvideCommon.MD5(sbText.ToString());//sign的值为md5(user_gold_order_domain_平台密钥) 算法生成的哈希值(小写)

            sbText.Remove(0, sbText.Length);
            string serverdomain = GetDomain(sGame);
            string TranURL      = "http://api.sxd.xd.com/api/buygold.php";

            sbText.Append(TranURL);
            sbText.AppendFormat("?user={0}&", user);
            sbText.AppendFormat("domain={0}&", domain);
            sbText.AppendFormat("order={0}&", sOrderID);
            sbText.AppendFormat("gold={0}&", gold);
            sbText.AppendFormat("sign={0}", sign);
            string sRes    = ProvideCommon.GetPageInfo(sbText.ToString());
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            string user_ip = ProvideCommon.GetRealIP();

            GamePayBLL.GamePayAdd(user_ip, sbText.ToString(), sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
示例#26
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        paytime  = ProvideCommon.getTime().ToString();
            int           iMoney   = Convert.ToInt32(dMoney);
            int           gold     = iMoney * 10;
            string        serverid = GetServerID(sGame);
            string        key      = "308494a405f92ca02c74d562aed83ce3";
            StringBuilder sbText   = new StringBuilder();

            sbText.AppendFormat("{0}|", sUserID);
            sbText.AppendFormat("{0}|", paytime);
            sbText.AppendFormat("{0}|", gold.ToString());
            sbText.AppendFormat("{0}|", serverid);
            sbText.Append(key);

            string sSign = ProvideCommon.MD5(sbText.ToString());//md5(“$accname|$paytime|$gold|$serverid|密钥”)

            sbText.Remove(0, sbText.Length);
            string sGamePayUrl = string.Format("http://s{0}.yjxy.dao50.com/intf/general/pay.php", serverid);

            sbText.AppendFormat("accname={0}&paytime={1}&gold={2}&billno={3}&serverid={4}&sign={5}",
                                sUserID, paytime, gold.ToString(), sOrderID, serverid, sSign);
            string sRes    = ProvideCommon.GetPageInfoByPost(sGamePayUrl, sbText.ToString(), "UTF-8");
            string sTranIP = ProvideCommon.GetRealIP();
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            string sUrl = string.Format("{0}?{1}", sGamePayUrl, sbText.ToString());

            GamePayBLL.GamePayAdd(sTranIP, sUrl, sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
示例#27
0
        protected void RegButton_Click(object sender, EventArgs e)
        {
            string sAccount  = CYRequest.GetFormString("txz").Trim();
            string sPassWord = CYRequest.GetFormString("pwdtwo").Trim();

            string sValCode = Request["ValCode"].ToString();
            string sRes     = ValCheckCode(sValCode);

            if (sRes != "0")
            {
                StringBuilder sbText = new StringBuilder();
                sbText.Append("<script>alert('");
                sbText.Append(sRes);
                sbText.Append("')</script>");
                sMsg = sbText.ToString();
                return;
            }

            string sValMessage = UserBll.RegCheck(sAccount, sPassWord);

            if (sValMessage != "")
            {
                sMsg = sValMessage;
                return;
            }

            int iUID = UserBll.UserReg(sAccount, sPassWord);

            if (-1 == iUID)
            {
                sMsg = "<script>alert('注册失败,请重试!')</script>";
                return;
            }
            else if (iUID > 999)
            {
                string   sQuestion = CYRequest.GetString("question");
                string   sAnswer   = CYRequest.GetString("answer");
                string   sEmail    = CYRequest.GetString("email");
                string   sName     = CYRequest.GetString("realname");
                string   sCrednnum = CYRequest.GetString("credennum");
                UserInfo uiObject  = new UserInfo();
                uiObject.Credennum = sCrednnum;
                uiObject.Answer    = sAnswer;
                uiObject.Email     = sEmail;
                uiObject.Name      = sName;
                uiObject.question  = sQuestion;
                uiObject.regip     = ProvideCommon.GetRealIP();
                uiObject.uid       = iUID;
                UserInfoBLL.UserInfoAdd(uiObject);
                string sPageUrl = Request.Url.ToString();
                LoginStateSet(sAccount, iUID, sPageUrl);
                string sWUrl   = WebConfig.BaseConfig.sWUrl;
                string sWWWUrl = string.Format("{0}/{1}?un={2}", sWUrl, "usercookie.aspx", sAccount);
                string sKey    = ConfigurationManager.AppSettings["UserValKey"].ToString();
                string sBBSUrl = DiscuzUserI.BBSLogin(sAccount, sPassWord, sKey);
                string sJSUrl  = string.Format("<script src='{0}'></script><script src='{1}'></script>", sBBSUrl, sWWWUrl);
                sMsg = string.Format("{0}<script>alert('注册成功!');location.href='http://www.dao50.com/';</script>", sJSUrl);
                return;
            }
        }
示例#28
0
        public static string jdsjPay(string sGameAbbre, int iUserID, string sUserName, int iPayPoints, string sPhone, int iGUserID)
        {
            int    iMoney  = iPayPoints / 10;
            string sTranIP = ProvideCommon.GetRealIP();
            string sTranID = TransGBLL.GameSalesInit(sGameAbbre, iPayPoints, sUserName, sPhone, iGUserID, sTranIP);
            string sTGRes  = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre).ToString();

            if (sTGRes != "0")
            {
                return(sTGRes);
            }
            string sRes    = Pay(iGUserID.ToString(), iMoney, sTranID, sGameAbbre);
            string sReturn = string.Empty;

            try
            {
                JSONObject json   = JSONConvert.DeserializeObject(sRes);
                string     status = json["status"].ToString();
                if (status == "400")
                {
                    sReturn = string.Format("0|{0}", sTranID);
                }
                else
                {
                    sReturn = sRes;
                }
            }
            finally
            {
                JSONConvert.clearJson();
            }
            return(sReturn);
        }
示例#29
0
        public static string Pay(string sUserID, int iMoney, string sOrderID, string sGame)
        {
            string        type     = "dao50";
            string        serverid = GetServerID(sGame);
            string        key      = "VViVnYZgpwrXMMQtqYUCsLqVGSuuQsUy";
            string        time     = DateTime.Now.ToString("yyyyMMddHHmmss");
            int           point    = iMoney * 10;//游戏虚拟货币数量
            StringBuilder sbText   = new StringBuilder();

            sbText.AppendFormat("uid={0}&uname={0}&serverid={1}&point={2}&amount={3}&oid={4}&time={5}&type={6}&key={7}",
                                sUserID, serverid, point, iMoney, sOrderID, time, type, key);
            string sign = ProvideCommon.MD5(sbText.ToString());//md5("uid=&uname=&serverid=&point=&amount=&oid=&time=&type=&key=");

            sbText.Remove(0, sbText.Length);
            //string format = "plain";//默认json可选值plain、xml
            string TranURL = "http://user.jdsj.dao50.com/VouchV2/AddGameCoin";

            sbText.AppendFormat("uid={0}&uname={0}&serverid={1}&point={2}&amount={3}", sUserID, serverid, point, iMoney);
            sbText.AppendFormat("&oid={0}&time={1}&type={2}&sign={3}", sOrderID, time, type, sign);
            string sRes    = ProvideCommon.GetPageInfoByPost(TranURL, sbText.ToString(), "UTF-8");
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            string sUrl    = string.Format("{0}?{1}", TranURL, sbText.ToString());
            string user_ip = ProvideCommon.GetRealIP();

            GamePayBLL.GamePayAdd(user_ip, sUrl, sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
示例#30
0
        public static string PayBegin(string sChannel, string sPhone, string sAccount, decimal dPrice, int iCount, string gatewayId, string cardTypeCombine)
        {
            string sTranIP  = ProvideCommon.GetRealIP();
            string sOrderID = TransPBLL.PointSalesInit(sChannel, sPhone, sAccount, dPrice, iCount, sTranIP);   //定单号;
            string itemName = string.Format("{0}武林币充值", (dPrice * 10).ToString());

            return(PayDirect(sOrderID, dPrice, sAccount, itemName, gatewayId, cardTypeCombine));
        }