Exemple #1
0
        public static string GameisLogin(string sUserID, string sGameAbbre)
        {
            string account  = sUserID;
            string serverid = GetServerID(sGameAbbre);
            string sURL     = string.Format("http://login.dao50.z.ucjoy.com/accountquery.php?account={0}&serverid={1}", account, serverid);
            string sRes     = ProvideCommon.GetPageInfo(sURL);
            string sReturn  = string.Empty;

            if (sRes == "0")
            {
                sReturn = "1";
            }
            else
            {
                sReturn = "0";
            }
            return(sReturn);
        }
Exemple #2
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        PayToUser = sUserID;
            string        PAY_KEY   = "=zwx=dao50=X1QZ7j:oc9fQV:1nUGTm";
            string        Mode      = "1";
            string        serverid  = GetServerID(sGame);
            int           iMoney    = Convert.ToInt32(dMoney);
            string        money     = iMoney.ToString();
            string        gold      = (iMoney * 10).ToString();
            string        time      = ProvideCommon.getTime().ToString();//标准时间戳
            StringBuilder sbText    = new StringBuilder();

            sbText.Append(PAY_KEY);
            sbText.Append(Mode);
            sbText.Append(sOrderID);
            sbText.Append(PayToUser);
            sbText.Append(money);
            sbText.Append(gold);
            sbText.Append(time);
            //md5(PAY_KEY + Mode + PayNum + PayToUser + PayMoney + PayGold + PayTime )
            string flag = ProvideCommon.MD5(sbText.ToString());//md5(order + username + gold + time + PAY_KEY + agentName + server + money)

            sbText.Remove(0, sbText.Length);
            string TranURL = string.Format("http://s{0}.zwx.dao50.com/user/pay.php?", serverid);

            sbText.Append(TranURL);
            sbText.AppendFormat("PayToUser={0}&", sUserID);
            sbText.AppendFormat("serverid={0}&", serverid);
            sbText.AppendFormat("PayNum={0}&", sOrderID);
            sbText.AppendFormat("PayMoney={0}&", money);
            sbText.AppendFormat("PayGold={0}&", gold);
            sbText.AppendFormat("Mode={0}&", Mode);
            sbText.AppendFormat("ticket={0}&", flag);
            sbText.AppendFormat("PayTime={0}", time);
            //?PayToUser=123&serverid=1&PayNum=1332147643&PayMoney=100&PayGold=1000&Mode=1&ticket=e819b728fa59685a3587f9d2813b312b&PayTime=1332147643
            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);
        }
Exemple #3
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string  serverid     = GetServerID(sGame);
            string  amount       = dMoney.ToString();;
            string  timestamp    = ProvideCommon.getTime().ToString();
            string  order_id     = sOrderID.Substring(0, 32);
            string  agentid      = "24";
            decimal order_amount = Convert.ToInt32(dMoney);
            string  sRess        = ValBind(sUserID, serverid, agentid);

            if (sRess == "0")
            {
                return("0");
            }
            string        key    = "Wfe^j*3Hi2";
            StringBuilder sbText = new StringBuilder();

            sbText.AppendFormat("{0}", sUserID);
            sbText.AppendFormat("{0}", order_amount);
            sbText.AppendFormat("{0}", order_id);
            sbText.AppendFormat("{0}", "s" + serverid);
            sbText.AppendFormat("{0}", key);
            string sSign = ProvideCommon.MD5(sbText.ToString());//MD5签名sign = md5(chargeid + username +money +payway + needmoney +key);

            sbText.Remove(0, sbText.Length);
            //sbText.AppendFormat("http://s{0}.sskc.dao50.com/api/active.php?", serverid);
            sbText.Append("http://bleach.sina.gametrees.com/api/dao50/payment.php?");
            sbText.AppendFormat("uid={0}", sUserID);
            sbText.AppendFormat("&server_id=s{0}", serverid);
            sbText.AppendFormat("&order_amount={0}", order_amount);
            sbText.AppendFormat("&order_id={0}", order_id);
            sbText.AppendFormat("&agentid={0}", agentid);
            sbText.AppendFormat("&sign={0}", sSign);
            string sRes    = ProvideCommon.GetPageInfo(sbText.ToString());
            string sTranIP = ProvideCommon.GetRealIP();
            int    iUserID = 0;

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

            GamePayBLL.GamePayAdd(sTranIP, sUrl, sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
Exemple #4
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        center_id       = "1073";
            string        response_format = "1";
            string        pay_type        = "1";
            string        time            = ProvideCommon.getTime().ToString();
            int           rmb             = Convert.ToInt32(dMoney);
            int           gold            = rmb * 100;
            string        serverid        = GetServerID(sGame);
            string        key             = "siawVVD8vDf834jFiek";
            StringBuilder sbText          = new StringBuilder();

            sbText.AppendFormat("{0}", sUserID);
            sbText.AppendFormat("{0}", center_id);
            sbText.AppendFormat("{0}", serverid);
            sbText.AppendFormat("{0}", time);
            sbText.AppendFormat("{0}", sOrderID);
            sbText.AppendFormat("{0}", gold);
            sbText.AppendFormat("{0}", response_format);
            sbText.AppendFormat("{0}", pay_type);
            sbText.AppendFormat("{0}", key);
            string sSign = ProvideCommon.MD5(sbText.ToString());//md5 ( $user.$gold.$server_id.$order_id.KEY )

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("http://s{0}.jjp.dao50.com//pay/payment.py?", serverid);
            sbText.AppendFormat("account={0}", sUserID);
            sbText.AppendFormat("&center_id={0}", center_id);
            sbText.AppendFormat("&server_id={0}", serverid);
            sbText.AppendFormat("&time={0}", time);
            sbText.AppendFormat("&bill_no={0}", sOrderID);
            sbText.AppendFormat("&amt={0}", gold);
            sbText.AppendFormat("&pay_type={0}", pay_type);
            sbText.AppendFormat("&response_format={0}", response_format);
            sbText.AppendFormat("&debug={0}", "0");
            sbText.AppendFormat("&sign={0}", sSign);

            string sRes    = ProvideCommon.GetPageInfo(sbText.ToString(), "UTF-8");
            string sTranIP = ProvideCommon.GetRealIP();
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            GamePayBLL.GamePayAdd(sTranIP, sbText.ToString(), sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
Exemple #5
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        sGamePayUrl = "";
            string        server_id   = GetServerID(sGame);
            string        order_id    = sOrderID;
            string        user_id     = sUserID;
            string        coin        = Convert.ToString(dMoney * 10);
            string        money       = dMoney.ToString();;
            string        time        = ProvideCommon.getTime().ToString();
            string        role_id     = GetRoleId(sUserID, sGame);
            string        key         = "b906592f135016f44c3b194180268e21";
            StringBuilder sbText      = new StringBuilder();

            sbText.AppendFormat("{0}", order_id);
            sbText.AppendFormat("{0}", user_id);
            sbText.AppendFormat("{0}", server_id);
            sbText.AppendFormat("{0}", coin);
            sbText.AppendFormat("{0}", money);
            sbText.AppendFormat("{0}", time);
            sbText.AppendFormat("{0}", key);
            string sSign = ProvideCommon.MD5(sbText.ToString());//md5(“$accname|$paytime|$gold|$serverid|密钥”)

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("{0}", "http://open.zuiwuji.com/api/dao50/order_submit.php?");
            sbText.AppendFormat("order_id={0}", order_id);
            sbText.AppendFormat("&user_id={0}", user_id);
            sbText.AppendFormat("&server_id={0}", server_id);
            sbText.AppendFormat("&coin={0}", coin);
            sbText.AppendFormat("&money={0}", money);
            sbText.AppendFormat("&time={0}", time);
            sbText.AppendFormat("&role_id={0}", role_id);
            sbText.AppendFormat("&sign={0}", sSign);

            string sRes    = ProvideCommon.GetPageInfo(sbText.ToString());
            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);
        }
Exemple #6
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        agentName  = "dao50";
            string        TICKET_PAY = "dao50::TGZT::PAY::KEY::ChCAVUxKfmnEAk";
            string        server     = GetServerID(sGame);
            int           iMoney     = Convert.ToInt32(dMoney);
            string        money      = iMoney.ToString();
            string        gold       = (iMoney * 10).ToString();
            string        time       = ProvideCommon.getTime().ToString();//标准时间戳
            StringBuilder sbText     = new StringBuilder();

            sbText.Append(sOrderID);
            sbText.Append(sUserID);
            sbText.Append(gold);
            sbText.Append(time);
            sbText.Append(TICKET_PAY);
            sbText.Append(agentName);
            sbText.Append(server);
            sbText.Append(money);
            string flag = ProvideCommon.MD5(sbText.ToString());//md5(order + username + gold + time + PAY_KEY + agentName + server + money)

            sbText.Remove(0, sbText.Length);
            string TranURL = "http://web.tgzt.mingchaoonline.com/api/v1/mc/pay.php?";

            sbText.Append(TranURL);
            sbText.AppendFormat("order={0}&", sOrderID);
            sbText.AppendFormat("username={0}&", sUserID);
            sbText.AppendFormat("money={0}&", money);
            sbText.AppendFormat("gold={0}&", gold);
            sbText.AppendFormat("time={0}&", time);
            sbText.AppendFormat("flag={0}&", flag);
            sbText.AppendFormat("server={0}&", server);
            sbText.AppendFormat("agentName={0}&", agentName);
            sbText.Append("moneyType=1");
            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);
        }
Exemple #7
0
        public static string GameisLogin(string sUserID, string sGameAbbre)
        {
            string sReturn     = string.Empty;
            string sGamePayUrl = ServerHost(sGameAbbre);
            string sUrl        = string.Format("{0}/username?account={1}", sGamePayUrl, sUserID);
            string sRes        = ProvideCommon.GetPageInfo(sUrl);

            switch (sRes)
            {
            case "0":
                sReturn = "1";
                break;

            default:
                sReturn = sRes;
                break;
            }
            return(sReturn);
        }
Exemple #8
0
        /// <summary>
        /// 游戏充值
        /// </summary>
        /// <param name="sUserID">用户id</param>
        /// <param name="dMoney">充值金额</param>
        /// <param name="sOrderID">定单号</param>
        /// <param name="sGame">游戏缩写</param>
        /// <returns></returns>
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string  payKey  = "dzCHSdZiT3XDbsWRe2Oz";
            string  opt     = "dao50";
            string  server  = "s" + GetServerID(sGame);
            string  user    = sUserID;
            int     iMoney  = Convert.ToInt32(dMoney);
            decimal tombo   = iMoney * 10;
            string  order   = sOrderID;
            string  sign    = ProvideCommon.MD5(opt + server + user + tombo + order + payKey);
            string  sPayUrl = string.Format("http://pay.ebogame.com/pay?opt={0}&server={1}&user={2}&tombo={3}&order={4}&sign={5}", opt, server, user, tombo, order, sign);
            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);
            return(sRes);
        }
Exemple #9
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        pfid       = "12";//平台id
            int           iMoney     = Convert.ToInt32(dMoney);
            int           iGameMoney = iMoney * 10;
            string        money      = iGameMoney.ToString();
            string        PAY_KEY    = "=TZ=::dao50::PayZL::KEY::*!!ieSi40OSigi2~!*";
            string        sSHAPAYKEY = ProvideCommon.SHA1(PAY_KEY).ToLower();
            string        serverid   = sGame.Replace("tzcq", "s");
            string        tstamp     = ProvideCommon.getTime().ToString();
            StringBuilder sbText     = new StringBuilder();

            sbText.Append(pfid);
            sbText.Append(sOrderID);
            sbText.Append(sUserID);
            sbText.Append(sUserID);
            sbText.Append(money);
            sbText.Append(serverid);
            sbText.Append(tstamp);
            sbText.Append(sSHAPAYKEY);
            string sig   = ProvideCommon.SHA1(sbText.ToString()).ToLower();//sha1(pfid + orderid + uid + name + money + serverid + tstamp +sha1(PAY_KEY))
            string sHost = GetDomain(sGame);
            string sUrl  = string.Format("http://{0}/pay.php?pfid={1}&orderid={2}&uid={3}&name={3}&money={4}&serverid={5}&tstamp={6}&sig={7}", sHost, pfid, sOrderID, sUserID, money, serverid, tstamp, sig);
            string sRes  = ProvideCommon.GetPageInfo(sUrl.ToString());
            string sRet  = string.Empty;

            try
            {
                JSONObject json = JSONConvert.DeserializeObject(sRes);
                sRet = json["ret"].ToString();
            }
            finally
            {
                JSONConvert.clearJson();
            }
            string user_ip = ProvideCommon.GetRealIP();
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            GamePayBLL.GamePayAdd(user_ip, sUrl, sOrderID, sRes, sGame, iUserID);
            return(sRet);
        }
Exemple #10
0
        public static string GameIsLogin(string sUserID, string sGame)
        {
            string sReturn  = string.Empty;
            string sServer  = sGame.Replace("mg", "");
            string sUrl     = string.Format("http://mg{0}.dao50.com:8080/query/dao50/{0}/by/username?name={1}", sServer, sUserID);
            string sJsonRes = ProvideCommon.GetPageInfo(sUrl);
            string sRes     = GetReturn(sJsonRes);

            switch (sRes)
            {
            case "-1":
                sReturn = "1";
                break;

            default:
                sReturn = sRes;
                break;
            }
            return(sReturn);
        }
Exemple #11
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        serverid  = GetServerID(sGame);
            string        amount    = dMoney.ToString();;
            string        timestamp = ProvideCommon.getTime().ToString();
            string        coopname  = "dao50";
            string        key       = "c4be0bb733977b8c0602bb39f072";
            StringBuilder sbText    = new StringBuilder();

            sbText.AppendFormat("coopname={0}", coopname);
            sbText.AppendFormat("&serverid={0}", serverid);
            sbText.AppendFormat("&userid={0}", sUserID);
            sbText.AppendFormat("&amount={0}", amount);
            sbText.AppendFormat("&orderid={0}", sOrderID);
            sbText.AppendFormat("&key={0}", key);
            sbText.AppendFormat("&timestamp={0}", timestamp);
            string sSign = ProvideCommon.MD5(sbText.ToString());//MD5(coopname=&serverid=&userid=&amount=&orderid=&key=&timestamp=)

            sbText.Remove(0, sbText.Length);
            sbText.Append("http://dntg.pay.lingyuwangluo.com/dntgc/dntgdcs?");
            sbText.AppendFormat("coopname={0}", coopname);
            sbText.AppendFormat("&userid={0}", sUserID);
            sbText.AppendFormat("&serverid={0}", serverid);
            sbText.AppendFormat("&orderid={0}", sOrderID);
            sbText.AppendFormat("&amount={0}", amount);
            sbText.Append("&currency=CNY");
            sbText.Append("&result=1");
            sbText.AppendFormat("&timestamp={0}", timestamp);
            sbText.AppendFormat("&sign={0}", sSign);

            string sRes    = ProvideCommon.GetPageInfo(sbText.ToString());
            string sTranIP = ProvideCommon.GetRealIP();
            int    iUserID = 0;

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

            GamePayBLL.GamePayAdd(sTranIP, sUrl, sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
Exemple #12
0
        public static string GameisLogin(string sUserID, string sGameAbbre)
        {
            string        spid     = "dao50";
            string        gameid   = "2";
            string        serverid = GetServerID(sGameAbbre);
            StringBuilder sbText   = new StringBuilder();

            sbText.AppendFormat("{0}|", spid);
            sbText.AppendFormat("{0}|", gameid);
            sbText.AppendFormat("{0}|", serverid);
            sbText.AppendFormat("{0}|", sUserID);
            sbText.Append(key);
            string sign = ProvideCommon.MD5(sbText.ToString());//md5(spid|gameid|serverid|userid|key)

            sbText.Remove(0, sbText.Length);
            string TranURL = "http://mid.gamefy.cn/union_mid/query_user";

            sbText.Append(TranURL);
            sbText.AppendFormat("?userid={0}&", sUserID);
            sbText.AppendFormat("spid={0}&", spid);
            sbText.AppendFormat("gameid={0}&", gameid);
            sbText.AppendFormat("serverid={0}&", serverid);
            sbText.AppendFormat("sign={0}", sign);
            string     sRes    = ProvideCommon.GetPageInfo(sbText.ToString());
            string     sReturn = string.Empty;
            JSONObject json    = JSONConvert.DeserializeObject(sRes);
            string     sCode   = json["code"].ToString();

            JSONConvert.clearJson();
            switch (sCode)
            {
            case "2001":
                sReturn = "1";
                break;

            default:
                sReturn = "0";
                break;
            }
            return(sReturn);
        }
Exemple #13
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        AgentID    = "15";
            string        TICKET_PAY = "dao50::XLFC::Pay::KEY::m9uMnDX64RMYzCk931Gn";
            string        Serverid   = GetServerID(sGame);
            int           iMoney     = Convert.ToInt32(dMoney);
            string        PayMoney   = iMoney.ToString();
            string        PayGold    = (iMoney * 10).ToString();
            string        PayTime    = ProvideCommon.getTime().ToString();//标准时间戳
            string        user_ip    = ProvideCommon.GetRealIP();
            StringBuilder sbText     = new StringBuilder();

            sbText.Append(TICKET_PAY);
            sbText.Append(sOrderID);
            sbText.Append(sUserID);
            sbText.Append(PayMoney);
            sbText.Append(PayGold);
            sbText.Append(PayTime);
            sbText.Append(AgentID);
            sbText.Append(Serverid);
            string ticket = ProvideCommon.MD5(sbText.ToString());//md5($API_SECURITY_TICKET_PAY . PayNum . PayToUser . PayMoney . PayGold . PayTime . AgentID. ServerID);

            sbText.Remove(0, sbText.Length);
            string TranURL = "http://web.xlfc.dao50.com/api/pay.php?";

            sbText.Append(TranURL);
            sbText.AppendFormat("PayNum={0}&", sOrderID);
            sbText.AppendFormat("PayToUser={0}&", sUserID);
            sbText.AppendFormat("PayMoney={0}&", PayMoney);
            sbText.AppendFormat("PayGold={0}&", PayGold);
            sbText.AppendFormat("PayTime={0}&", PayTime);
            sbText.AppendFormat("AgentID={0}&", AgentID);
            sbText.AppendFormat("ServerID={0}&", Serverid);
            sbText.AppendFormat("ticket={0}", ticket);
            string sRes    = ProvideCommon.GetPageInfo(sbText.ToString());
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            GamePayBLL.GamePayAdd(user_ip, sbText.ToString(), sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
Exemple #14
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        spid     = "dao50";
            string        gameid   = "2";
            string        serverid = GetServerID(sGame);
            int           gold     = Convert.ToInt32((dMoney * 100));    //充值人民币,单位:分
            string        ctime    = ProvideCommon.getTime().ToString(); //标准时间戳
            string        user_ip  = ProvideCommon.GetRealIP();
            StringBuilder sbText   = new StringBuilder();

            sbText.AppendFormat("{0}|", spid);
            sbText.AppendFormat("{0}|", gameid);
            sbText.AppendFormat("{0}|", serverid);
            sbText.AppendFormat("{0}|", sUserID);
            sbText.AppendFormat("{0}|", sOrderID);
            sbText.AppendFormat("{0}|", gold.ToString());
            sbText.AppendFormat("{0}|", user_ip);
            sbText.AppendFormat("{0}|", ctime);
            sbText.Append(key);
            string sign = ProvideCommon.MD5(sbText.ToString());//md5(spid|gameid|serverid|userid|orderid|money|userip|ctime|key)

            sbText.Remove(0, sbText.Length);
            string TranURL = "http://mid.gamefy.cn/union_mid/charge";

            sbText.Append(TranURL);
            sbText.AppendFormat("?userid={0}&", sUserID);
            sbText.AppendFormat("spid={0}&", spid);
            sbText.AppendFormat("gameid={0}&", gameid);
            sbText.AppendFormat("serverid={0}&", serverid);
            sbText.AppendFormat("orderid={0}&", sOrderID);
            sbText.AppendFormat("money={0}&", gold.ToString());
            sbText.AppendFormat("userip={0}&", user_ip);
            sbText.AppendFormat("ctime={0}&", ctime);
            sbText.AppendFormat("sign={0}", sign);
            string sRes    = ProvideCommon.GetPageInfo(sbText.ToString());
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            GamePayBLL.GamePayAdd(user_ip, sbText.ToString(), sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
Exemple #15
0
        public static string GameisLogin(string sUserID, string sGameAbbre)
        {
            string        user   = sUserID;
            StringBuilder sbText = new StringBuilder();

            sbText.Append(user);
            string time = ProvideCommon.getTime().ToString();//标准时间戳

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

            sbText.Remove(0, sbText.Length);
            string sDomain = GetDomain(sGameAbbre);
            string TranURL = string.Format("http://{0}/api/verify_user", sDomain);

            sbText.Append(TranURL);
            sbText.AppendFormat("?user={0}&", user);
            sbText.AppendFormat("time={0}&", time);
            sbText.AppendFormat("sign={0}", sign);
            string sRes    = ProvideCommon.GetPageInfo(sbText.ToString());
            string sReturn = string.Empty;

            switch (sRes)
            {
            case "1":
                sReturn = "0";
                break;

            case "2":
            case "-4":
            case "-5":
                sReturn = "1";
                break;

            default:
                sReturn = sRes;
                break;
            }
            return(sReturn);
        }
Exemple #16
0
        public static string GameisLogin(string sUserID, string sGameAbbre)
        {
            string        channel = "19";
            string        server  = ServerName(sGameAbbre);
            string        sKey    = "0b4c853574e51142";
            Random        rNum    = new Random();
            int           iCur    = rNum.Next(0, sKey.Length - 1);
            string        cur     = iCur.ToString();
            StringBuilder sbText  = new StringBuilder();

            sbText.Append(sKey.Substring(0, iCur));
            sbText.Append(channel);
            sbText.Append(server);
            sbText.Append(sUserID);
            sbText.Append(sKey.Substring(iCur));

            string sSign = Common.ProvideCommon.MD5(sbText.ToString());//md5(substr($channelKey,0,$cur).$channel.$server.$account.substr($channelKey,$cur))

            sbText.Remove(0, sbText.Length);
            string sQueryUrl = "http://gm.qxz.youxi567.com/rest/wl_query_user.php";

            sbText.Append(sQueryUrl);
            sbText.AppendFormat("?channel={0}&", channel);
            sbText.AppendFormat("server={0}&", server);
            sbText.AppendFormat("account={0}&", sUserID);
            sbText.AppendFormat("cur={0}&", cur);
            sbText.AppendFormat("key={0}", sSign);
            string sRes     = ProvideCommon.GetPageInfo(sbText.ToString());
            string sJsonRes = ProvideCommon.getJsonValue("success", sRes);
            string sReturn  = string.Empty;

            if (sJsonRes == "-1")
            {
                sReturn = "1";
            }
            else
            {
                sReturn = "0";
            }
            return(sReturn);
        }
Exemple #17
0
        public static string Pay(string sUserID, int iMoney, string sOrderID, string sGame)
        {
            string        sKey        = "long_dao50_pay_KEY_WeeoieEwu3ReKejewrre9KejeRiee2Jekw";
            string        sGamePayUrl = GameUrl(sGame);
            StringBuilder sbText      = new StringBuilder();

            sbText.Append(sOrderID);
            sbText.Append(sKey);

            string sSign = Common.ProvideCommon.MD5(sbText.ToString());//uid+money+orderid+leagId+key+add_key

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("{0}/username?name={1}&money={2}&gold={3}&coupon=0&coin=0&order={4}&sign={5}", sGamePayUrl, sUserID, iMoney, iMoney / 10, sOrderID, sSign);
            string sRes    = ProvideCommon.GetPageInfo(sbText.ToString());
            string sTranIP = ProvideCommon.GetRealIP();
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            GamePayBLL.GamePayAdd(sTranIP, sbText.ToString(), sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
Exemple #18
0
        public static string GameisLogin(string sUserID, string sGameAbbre)
        {
            string        sReturn = string.Empty;
            string        key     = "dao50_0ther_squSotStyw*tv(ZFwv(ZEwDZvqref";
            string        time    = ProvideCommon.getTime().ToString();
            StringBuilder sbText  = new StringBuilder();

            sbText.Append(sUserID);
            sbText.Append(time);
            sbText.Append(key);
            string sign         = ProvideCommon.MD5(sbText.ToString());;//	md5($username.$time.OTHER_KEY)
            string serverdomain = GetDomain(sGameAbbre);
            string sUrl         = string.Format("http://{0}/api/user_info.php?accountName={1}&time={2}&sign={3}", serverdomain, sUserID, time, sign);
            string sRes         = ProvideCommon.GetPageInfo(sUrl);

            if (sRes.IndexOf("\"data\":\"\"") > -1)
            {
                sReturn = "1";
            }
            return(sReturn);
        }
Exemple #19
0
        public static string GameisLogin(string sUserID, string sGameAbbre)
        {
            string        sReturn = string.Empty;
            string        key     = "4399hy-1116jdu3-cm3d_dao50";
            string        time    = ProvideCommon.getTime().ToString();
            StringBuilder sbText  = new StringBuilder();

            sbText.Append(sUserID);
            sbText.Append(time);
            sbText.Append(key);
            string sign         = ProvideCommon.MD5(sbText.ToString());;//	md5(username + time + 密钥)
            string serverdomain = GetDomain(sGameAbbre);
            string sUrl         = string.Format("http://{0}/api/get_player_info.php?username={1}&time={2}&flag={3}", serverdomain, sUserID, time, sign);
            string sRes         = ProvideCommon.GetPageInfo(sUrl);

            if (sRes.IndexOf("[]") > -1)
            {
                sReturn = "1";
            }
            return(sReturn);
        }
Exemple #20
0
        public static void pointpaysend(string sPTranID)
        {
            TransP tpObject = TransPBLL.UserTranSel(sPTranID);
            string sReturn  = string.Empty;

            if (tpObject.state == 1)
            {
                string        sUrl   = "http://union.dao50.com/tarns/transPoints.aspx";
                StringBuilder sbText = new StringBuilder();
                sbText.AppendFormat("orderid={0}&", tpObject.TranID.Trim());
                sbText.AppendFormat("userid={0}&", tpObject.UserID);
                sbText.AppendFormat("ordertime={0}&", tpObject.TranTime);
                sbText.AppendFormat("channel={0}&", tpObject.ChannelID);
                sbText.AppendFormat("price={0}&", tpObject.price);
                sbText.AppendFormat("points={0}&", tpObject.TranPoints);
                sbText.AppendFormat("giftpoints={0}&", tpObject.TranGiftPoints);
                sbText.AppendFormat("tranip={0}", tpObject.TranIP);
                sReturn = string.Format("{0}?{1}", sUrl, sbText.ToString());
            }
            ProvideCommon.GetPageInfo(sReturn);
        }
Exemple #21
0
        public static string GameisLogin(string sUserID, string sGameAbbre)
        {
            string        ubpartnerid  = "dao50";
            string        gameid       = "912000";
            string        serverid     = getServerID(sGameAbbre);
            string        username     = sUserID;
            string        eventtime    = DateTime.Now.ToString("yyyyMMddHHmmss");
            string        ubpartnerkey = "365ub-W6W1YKETLVH;JN?@=BI1CVT.G:<Tdao50";
            StringBuilder sbText       = new StringBuilder();

            sbText.AppendFormat(string.Format("ubpartnerid={0}&", ubpartnerid));
            sbText.AppendFormat(string.Format("gameid={0}&", gameid));
            sbText.AppendFormat(string.Format("serverid={0}&", serverid));
            sbText.AppendFormat(string.Format("username={0}&", username));
            sbText.AppendFormat(string.Format("eventtime={0}&", eventtime));
            sbText.AppendFormat(string.Format("ubpartnerkey={0}", ubpartnerkey));
            //MD5("ubpartnerid=&gameid=&serverid=&username=&eventtime=&ubpartnerkey=".ToUpper()).ToUpper();
            string sSign = ProvideCommon.MD5(sbText.ToString().ToUpper()).ToUpper();

            sbText.Remove(0, sbText.Length);
            sbText.Append("http://api.365ub.com/CheckUser.ashx?");
            sbText.AppendFormat("ubpartnerid={0}", ubpartnerid);
            sbText.AppendFormat("&gameid={0}", gameid);
            sbText.AppendFormat("&serverid={0}", serverid);
            sbText.AppendFormat("&username={0}", sUserID);
            sbText.AppendFormat("&eventtime={0}", eventtime);
            sbText.AppendFormat("&sign={0}", sSign);
            string sRes    = ProvideCommon.GetPageInfo(sbText.ToString());
            string sReturn = string.Empty;

            if (sRes.IndexOf("isexists=0&errcode=0") > -1)
            {
                sReturn = "1";
            }
            else
            {
                sReturn = sRes;
            }
            return(sReturn);
        }
Exemple #22
0
        public static bool GameisLoginVal(string sUserID, string sGameAbbre)
        {
            string sReturn = string.Empty;
            string op_id   = "115";
            string sid     = GetServerID(sGameAbbre);
            string account = sUserID;
            string time    = ProvideCommon.getTime().ToString();
            string sAuth   = string.Format("op_id={0}&sid={1}&game_id=8&account={2}&time={3}",
                                           op_id, sid, account, 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/roleverify?auth={0}&verify={1}", sBase64Auth, sVerify);
            string sRes        = ProvideCommon.GetPageInfo(sPayUrl);
            string sCode       = ProvideCommon.getJsonValue("status", sRes);
            bool   bRes        = false;

            if (sCode == "0")
            {
                bRes = true;
            }
            return(bRes);
        }
Exemple #23
0
        public static string GetAccessToken(string redirect_uri, string code)
        {
            string grant_type  = "authorization_code";
            string sQQTokenUrl = string.Format("https://graph.qq.com/oauth2.0/token?grant_type={0}&client_id={1}&redirect_uri={2}&code={3}&client_secret={4}",
                                               grant_type, client_id, redirect_uri, code, client_secret);
            string sTokenReturn = ProvideCommon.GetPageInfo(sQQTokenUrl);

            string[] sTokenReturnArray = sTokenReturn.Split('&');
            Dictionary <string, string> dTokenReturn = new Dictionary <string, string>();

            foreach (string i in sTokenReturnArray)
            {
                string[] sParams = i.Split('=');
                if (sParams.Length == 2)
                {
                    dTokenReturn.Add(sParams[0], sParams[1]);
                }
            }
            string sAccessToken = dTokenReturn["access_token"].ToString();

            return(sAccessToken);
        }
Exemple #24
0
        public static string Pay(string sUserID, int iMoney, string sOrderID, string sGame)
        {
            string        sKey        = "long2_dao50_pay_KEY_34eb3ReKejewrre9ok89Mm8vP1dT9vxE";
            string        sGamePayUrl = GamePayUrl(sGame);
            int           iGold       = iMoney / 10;
            StringBuilder sbText      = new StringBuilder();

            sbText.Append(sOrderID);
            sbText.Append(sKey);

            string sSign = Common.ProvideCommon.MD5(sbText.ToString());//MD5($order.$key)

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("{0}?content={1}&order={2}&money={3}&gold={4}&sign={5}", sGamePayUrl, sUserID, sOrderID, iMoney.ToString(), iGold.ToString(), sSign);
            string sRes    = ProvideCommon.GetPageInfo(sbText.ToString());
            string sTranIP = ProvideCommon.GetRealIP();
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            GamePayBLL.GamePayAdd(sTranIP, sbText.ToString(), sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
Exemple #25
0
        public static string GameisLogin(string sUserID, string sGameAbbre)
        {
            string        user_id   = sUserID;
            string        server_id = GetServerID(sGameAbbre);
            string        time      = ProvideCommon.getTime().ToString();
            string        key       = "b906592f135016f44c3b194180268e21";
            StringBuilder sbText    = new StringBuilder();

            sbText.AppendFormat("{0}", server_id);
            sbText.AppendFormat("{0}", user_id);
            sbText.AppendFormat("{0}", time);
            sbText.AppendFormat("{0}", key);
            string ticket = ProvideCommon.MD5(sbText.ToString());//md5(“$accname|$ts|$serverid|密钥”)

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("{0}", "http://open.zuiwuji.com/api/dao50/role_query.php?");
            sbText.AppendFormat("server_id={0}", server_id);
            sbText.AppendFormat("&time={0}", time);
            sbText.AppendFormat("&user_id={0}", user_id);
            sbText.AppendFormat("&sign={0}", ticket);
            string sUrl    = sbText.ToString();
            string sRes    = ProvideCommon.GetPageInfo(sUrl);
            string ssRes   = ProvideCommon.getJsonValue("code", sRes).Trim();
            string sReturn = string.Empty;

            switch (ssRes)
            {
            case "-1":
                sReturn = "1";
                break;

            default:
                //sReturn = "1";
                sReturn = "0";
                break;
            }
            return(sReturn);
        }
Exemple #26
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        sPayKey      = "BywqzsGK3FGA";
            StringBuilder sbText       = new StringBuilder();

            sbText.AppendFormat("{0}{1}{2}{3}{4}", order_amount, sUserID, sOrderID, time, sPayKey);
            string sign = ProvideCommon.MD5(sbText.ToString()).ToLower(); //md5(amount.u.order_no.time.key)

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("http://s{0}.nz.dao50.com/api/exchange.php?amount={1}&u={2}&order_no={3}&time={4}&sign={5}",
                                server_id, order_amount, sUserID, sOrderID, time, 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);
        }
Exemple #27
0
        public static void gamepaysend(string sGTranID)
        {
            TransG tgObject = TransGBLL.UserTranSel(sGTranID);
            string sReturn  = string.Empty;

            if (tgObject.state == 1)
            {
                string        sUrl   = "http://union.dao50.com/tarns/transGame.aspx";
                int           price  = tgObject.TranPoints / 10;
                StringBuilder sbText = new StringBuilder();
                sbText.AppendFormat("orderid={0}&", tgObject.TranID.Trim());
                sbText.AppendFormat("userid={0}&", tgObject.UserID);
                sbText.AppendFormat("gameid={0}&", tgObject.GameID);
                sbText.AppendFormat("ordertime={0}&", tgObject.TranTime);
                sbText.AppendFormat("gameuserid={0}&", tgObject.GUserID);
                sbText.AppendFormat("price={0}&", price.ToString());
                sbText.AppendFormat("points={0}&", tgObject.TranPoints);
                sbText.AppendFormat("giftpoints={0}&", tgObject.TranGiftPoints);
                sbText.AppendFormat("tranip={0}", tgObject.TranIP);
                sReturn = string.Format("{0}?{1}", sUrl, sbText.ToString());
            }
            ProvideCommon.GetPageInfo(sReturn);
        }
Exemple #28
0
        /// <summary>
        /// 判断账号是否登陆
        /// </summary>
        /// <param name="sUserID">用户id</param>
        /// <param name="sGameAbbre">游戏缩写</param>
        /// <returns>1为角色或用户不存在,其它为存在</returns>
        public static string GameisLogin(string sUserID, string sGameAbbre)
        {
            string logKey   = "Yxnh6lG02pmbEyVU0kZ0";
            string opt      = "dao50";
            string server   = "s" + GetServerID(sGameAbbre);
            string user     = sUserID;
            string sign     = ProvideCommon.MD5(opt + server + user + logKey);
            string sUserUrl = string.Format("http://{0}.sglj.dao50.com/getlevelbyuser.php?opt={1}&server={2}&user={3}&sign={4}", server, opt, server, user, sign);
            string sUserRes = ProvideCommon.GetPageInfo(sUserUrl);
            string sReturn  = string.Empty;

            switch (sUserRes)
            {
            case "-3":
                sReturn = "1";
                break;

            default:
                sReturn = "0";
                break;
            }
            return(sReturn);
        }
Exemple #29
0
        public static string GameisLogin(string sUserID, string sGameAbbre)
        {
            string        user    = sUserID;
            string        sDomain = GetDomain(sGameAbbre);
            StringBuilder sbText  = new StringBuilder();

            sbText.Append(user);
            sbText.AppendFormat("_{0}_", sDomain);
            sbText.Append(key);
            string sign = ProvideCommon.MD5(sbText.ToString());//md5(user_ domain _平台密钥)

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

            sbText.Append(TranURL);
            sbText.AppendFormat("?user={0}&", user);
            sbText.AppendFormat("domain={0}&", sDomain);
            sbText.AppendFormat("sign={0}", sign);
            string sRes    = ProvideCommon.GetPageInfo(sbText.ToString());
            string sReturn = string.Empty;

            switch (sRes)
            {
            case "1":
                sReturn = "0";
                break;

            case "4":
                sReturn = "1";
                break;

            default:
                sReturn = sRes;
                break;
            }
            return(sReturn);
        }
Exemple #30
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame, string sRoleID)
        {
            string        site      = GetSite(sGame);
            string        chargeID  = sOrderID;
            string        username  = sUserID;
            int           iMoney    = Convert.ToInt32(dMoney);
            int           point     = iMoney * 10;
            string        payway    = "1";
            string        money     = iMoney.ToString();
            string        moneytype = "rmb";
            string        key       = string.Format("CSIT-16dd22-WAN-0668-DAO50-56744-7ROAD-SHKKTANG-232F3SEN");
            StringBuilder sbText    = new StringBuilder();

            sbText.Append(chargeID);
            sbText.Append(username);
            sbText.Append(point);
            sbText.Append(payway);
            sbText.Append(money);
            sbText.Append(moneytype);
            sbText.Append(key);
            string sign    = ProvideCommon.MD5(sbText.ToString());//sign = md5(chargeID + username + point + payway + money + moneytype+ key)
            string context = string.Format("{0}|{1}|{2}|{3}|{4}|{5}|{6}",
                                           chargeID, username, point, payway, money, moneytype, sign);

            if (sRoleID == "")
            {
                sRoleID = GetRoleID(sUserID, sGame);
            }
            string sUrl    = string.Format("http://{0}/chargemoney?content={1}&site={2}&userid={3}", GetDomain(sGame), context, site, sRoleID);
            string sRes    = ProvideCommon.GetPageInfo(sUrl);
            string user_ip = ProvideCommon.GetRealIP();
            int    iUserID = 0;

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