Esempio n. 1
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);
        }
Esempio n. 2
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);
        }
Esempio n. 3
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);
        }
Esempio n. 4
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);
        }
Esempio n. 5
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);
        }
Esempio n. 6
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);
        }
Esempio n. 7
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string partnerid = "8";
            string gameid    = "1";
            string sid       = sGame.Replace("lc", "");
            string serverid  = string.Empty;

            switch (sid)
            {
            case "1":
            case "2":
            case "3":
            case "4":
            case "5":
            case "6":
            case "7":
            case "8":
                serverid = "1";
                break;

            default:
                serverid = sid;
                break;
            }
            string        username    = sUserID;
            string        money       = dMoney.ToString();
            string        api_key     = ")MSPu!ZLAMmG4)^p^M(af=CZVYJdGj";
            string        sGamePayUrl = "http://api.lianyun.62you.com/pay_formal_togame.php";
            long          lTime       = (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000;
            string        time        = lTime.ToString();
            StringBuilder sbText      = new StringBuilder();

            sbText.Append(gameid);
            sbText.Append(partnerid);
            sbText.Append(serverid);
            sbText.Append(sUserID);
            sbText.Append(username);
            sbText.Append(sOrderID);
            sbText.Append(money);
            sbText.Append(time);
            sbText.Append(api_key);

            string sSign = Common.ProvideCommon.MD5(sbText.ToString());//md5(gameid+ partnerid+sid+userid+urlencode(username)+orderid+money+time+api_key)

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("orderid={0}&partnerid={1}&gameid={2}&sid={3}&userid={4}&username={5}&actorid=&actorname=&money={6}&time={7}&sign={8}",
                                sOrderID, partnerid, gameid, serverid, sUserID, username, money, time, 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);
        }
Esempio n. 8
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        serverid = GetServerID(sGame);
            string        HTTPType = "POST";
            string        platform = "dao50";
            string        sURI     = string.Format("/{0}/pay", platform);
            string        sHost    = "http://203.195.183.207:9501";
            string        paytime  = ProvideCommon.getTime().ToString();
            int           iMoney   = Convert.ToInt32(dMoney);
            int           gold     = iMoney * 10;
            string        appkey   = "a21d0ab9a35f4cff87a1ebac72bd9a2a&";
            StringBuilder sbText   = new StringBuilder();

            sbText.AppendFormat("gold={0}", gold);
            sbText.AppendFormat("&order={0}", sOrderID);
            sbText.AppendFormat("&paytime={0}", paytime);
            sbText.AppendFormat("&rmb={0}", iMoney);
            sbText.AppendFormat("&time={0}", paytime);
            sbText.AppendFormat("&userid={0}", sURI);
            sbText.AppendFormat("&zoneid={0}", serverid);
            string sUrlEnQuery = UrlReplace(HttpUtility.UrlEncode(sbText.ToString()));
            string sURLEnURI   = UrlReplace(HttpUtility.UrlEncode(sURI));

            Common.HmacSha1.Hasher hs = new HmacSha1.Hasher();
            string data = HTTPType + "&" + sURLEnURI + "&" + sUrlEnQuery;

            hs.HashKey  = System.Text.Encoding.Default.GetBytes(appkey);
            hs.HashText = data;
            string sShaCode = hs.HMACSHA1Hasher();
            string sSign    = UrlReplace(HttpUtility.UrlEncode(sShaCode));//md5(“$accname|$paytime|$gold|$serverid|密钥”)

            sbText.Remove(0, sbText.Length);
            string sGamePayUrl = string.Format("{0}{1}", sHost, sURI);

            sbText.AppendFormat("userid={0}", sUserID);
            sbText.AppendFormat("&zoneid={0}", serverid);
            sbText.AppendFormat("&order={0}", sOrderID);
            sbText.AppendFormat("&rmb={0}", iMoney);
            sbText.AppendFormat("&gold={0}", gold);
            sbText.AppendFormat("&checksum={0}", sSign);
            sbText.AppendFormat("&time={0}", paytime);
            sbText.AppendFormat("&paytime={0}", paytime);

            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);
        }
Esempio n. 9
0
        public static string Login(string sUserID, string sGame, bool bRes)
        {
            string        site     = GetSite(sGame);
            string        key      = "DNTQ-16DD11-WAN-0668-daoDS50N-7ROAD-shenLQg-111SHEN";
            string        user     = sUserID;
            string        password = Guid.NewGuid().ToString("D");
            string        time     = ProvideCommon.getTime().ToString();
            StringBuilder sbText   = new StringBuilder();

            sbText.Append(user);
            sbText.Append(password);
            sbText.Append(time);
            sbText.Append(key);
            string sign    = ProvideCommon.MD5(sbText.ToString());//user+password+time+key
            string context = string.Format("{0}|{1}|{2}|{3}", user, password, time, sign);
            string sHost   = GetDomain(sGame);
            string preUrl  = string.Format("http://{0}/createlogin", sHost);

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("content={0}&site={1}", context, site);
            int iUserID = 0;
            int iIsPay  = 0;

            if (int.TryParse(sUserID, out iUserID))
            {
                string sTranID = TransPBLL.SelIsTranByUID(iUserID);
                if (sTranID.Length > 32)
                {
                    iIsPay = 1;
                }
            }
            sbText.AppendFormat("&isCharge={0}", iIsPay.ToString());
            string sRes = ProvideCommon.GetPageInfoByPost(preUrl, sbText.ToString(), "UTF-8");

            if (sRes == "0")
            {
                string Url = string.Format("http://{0}/client/game.jsp?user={1}&key={2}&site={3}", sHost, user, password, site);
                if (bRes)
                {
                    GameLoginBLL.GameLoginAdd(iUserID, sGame, ProvideCommon.GetRealIP(), Url);
                }
                return(Url);
            }
            else
            {
                return(string.Format("http://www.dao50.com/fwqwh/?{0}|{1}", preUrl, sbText.ToString()));
            }
        }
Esempio n. 10
0
        public static string Login(string sUserID, string sGame, string sClient)
        {
            string        serverid  = GetServerID(sGame);
            string        timestamp = ProvideCommon.getTime().ToString();
            string        password  = Guid.NewGuid().ToString().Substring(0, 32);
            string        site      = GetSite(sGame);//"jydao50_0001"; //+serverid;
            string        key       = "QY7RODDD-3rSDEDE-7roadjy-489385j-25255fdf-7ROADJyfd-SHENQU-Lvoe7road";
            StringBuilder sbText    = new StringBuilder();

            sbText.AppendFormat("{0}", sUserID);
            sbText.AppendFormat("{0}", password);
            sbText.AppendFormat("{0}", timestamp);
            sbText.AppendFormat("{0}", key);
            string sign = ProvideCommon.MD5(sbText.ToString()).ToLower();//MD5(coopname=&serverid=&userid=&key=&timestamp=)

            sbText.Remove(0, sbText.Length);
            string sUrl    = string.Format("http://s{0}.jy.dao50.com/createlogin", serverid);
            string content = string.Format("{0}|{1}|{2}|{3}", sUserID, password, timestamp, sign);

            sbText.AppendFormat("content={0}&", content);
            sbText.AppendFormat("site={0}", site);
            string sRes = ProvideCommon.GetPageInfoByPost(sUrl, sbText.ToString(), "UTF-8").Trim();

            switch (sRes)
            {
            case "0":
                sbText.Remove(0, sbText.Length);
                if (sClient == "pc")
                {
                    sbText.AppendFormat("http://s{0}.jy.dao50.com/client/Loading.swf?", serverid);
                }
                else
                {
                    sbText.AppendFormat("http://s{0}.jy.dao50.com/client/game.jsp?", serverid);
                }
                sbText.AppendFormat("user={0}&", sUserID);
                sbText.AppendFormat("key={0}&", password);
                sbText.AppendFormat("site={0}", site);
                break;

            default:
                sbText.Remove(0, sbText.Length);
                sbText.Append(sRes);
                break;
            }
            return(sbText.ToString());
        }
Esempio n. 11
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string from   = "dao50";
            string game   = "zsg";
            string server = GetServerID(sGame);
            string transfer_secret_signature = "d060e2a1ac5f5b7ecfdcc4bfd75562fc";
            string user_id      = sUserID;
            string order_number = sOrderID;
            string t            = ProvideCommon.getTime().ToString();

            int    iMoney = Convert.ToInt32(dMoney);
            string amount = (iMoney * 100).ToString();//充入的人民币数量(单位分,为10的整数倍),大于10

            StringBuilder sbText = new StringBuilder();

            sbText.AppendFormat("from={0}game={1}server={2}user_id={3}amount={4}order_number={5}t={6}transfer_secret_signature={7}", from, game, server, user_id, amount, order_number, t, transfer_secret_signature);
            string signature = ProvideCommon.MD5(sbText.ToString()).ToLower();

            string sGamePayUrl = "http://api.lianyun.173.com/api/pay";

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("from={0}&game={1}&server={2}&user_id={3}&amount={4}&order_number={5}&t={6}&signature={7}",
                                from, game, server, user_id, amount, order_number, t, signature);
            string sRes   = ProvideCommon.GetPageInfoByPost(sGamePayUrl, sbText.ToString(), "UTF-8");
            string status = string.Empty;

            if (sRes.IndexOf("status") > -1)
            {
                try
                {
                    JSONObject json = JSONConvert.DeserializeObject(sRes);
                    status = json["status"].ToString();
                }
                finally
                {
                    JSONConvert.clearJson();
                }
            }
            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(status);
        }
Esempio n. 12
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        sServer  = "S" + serverid;
            string        key      = "8dndyldpqr0qr0asd834heusdjajdwfsdfdr";
            string        strGame  = "ahxy";
            string        sAgent   = "dao50";
            StringBuilder sbText   = new StringBuilder();

            sbText.AppendFormat("{0}", key);
            sbText.AppendFormat("{0}", sUserID);
            sbText.AppendFormat("{0}", sOrderID.Substring(0, 30));
            sbText.AppendFormat("{0}", iMoney.ToString());
            sbText.AppendFormat("{0}", paytime);
            sbText.AppendFormat("{0}", sAgent);
            sbText.AppendFormat("{0}", sServer);
            sbText.AppendFormat("{0}", strGame);
            string sSign = ProvideCommon.MD5(sbText.ToString());//md5(“$accname|$paytime|$gold|$serverid|密钥”)

            sbText.Remove(0, sbText.Length);
            string sGamePayUrl = "http://pay.union.qq499.com:8029/pay_sync_togame.php";

            sbText.AppendFormat("game={0}", strGame);
            sbText.AppendFormat("&agent={0}", sAgent);
            sbText.AppendFormat("&user={0}", sUserID);
            sbText.AppendFormat("&order={0}", sOrderID.Substring(0, 30));
            sbText.AppendFormat("&money={0}", iMoney);
            sbText.AppendFormat("&server={0}", sServer);
            sbText.AppendFormat("&time={0}", paytime);
            sbText.AppendFormat("&sign={0}", 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);
        }
Esempio n. 13
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        channel = "19";
            string        server  = ServerName(sGame);
            string        sKey    = "0b4c853574e51142";
            int           iGold   = Convert.ToInt32(dMoney * 10);
            string        count   = iGold.ToString();
            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(sUserID);
            sbText.Append(sOrderID);
            sbText.Append(count);
            sbText.Append(server);
            sbText.Append(sKey.Substring(iCur));

            string sSign = Common.ProvideCommon.MD5(sbText.ToString());//md5(substr($keyM,0,$cur).$channel.$user.$order.$count.$server.substr($keyM,$cur));

            sbText.Remove(0, sbText.Length);
            string sGamePayUrl = "http://charge.qxz.youxi567.com/i_wl.php";

            sbText.AppendFormat("channel={0}&", channel);
            sbText.AppendFormat("server={0}&", server);
            sbText.AppendFormat("user={0}&", sUserID);
            sbText.AppendFormat("order={0}&", sOrderID);
            sbText.AppendFormat("count={0}&", count);
            sbText.AppendFormat("cur={0}&", cur);
            sbText.AppendFormat("key={0}", 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);
        }
Esempio n. 14
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            int           iMoney     = Convert.ToInt32(dMoney); //元
            int           cash       = iMoney * 10;             //角
            int           iGameMoney = cash;                    //金币
            string        serverid   = GetServerID(sGame);
            string        ts         = ProvideCommon.getHMTime();
            string        key        = "c0cc80a136af40c8b8a7a6b6cbc7ef39";
            StringBuilder sbText     = new StringBuilder();

            sbText.AppendFormat("account={0}", sUserID);
            sbText.AppendFormat("&cash={0}", cash.ToString());
            sbText.AppendFormat("&money={0}", iGameMoney.ToString());
            sbText.AppendFormat("&orderId={0}", sOrderID);
            sbText.AppendFormat("&sid=s{0}", serverid);
            sbText.AppendFormat("&ts={0}", ts);
            sbText.Append(key);
            string sSign = ProvideCommon.MD5(sbText.ToString());//md5(account=&cash=&money=&orderId=&profileId=&sid=&ts=)

            sbText.Remove(0, sbText.Length);
            string sGamePayUrl = string.Format("http://s{0}.mxsgz.niuzei.com:9001/recharge", serverid);

            sbText.AppendFormat("cash={0}", cash.ToString());
            sbText.AppendFormat("&money={0}", iGameMoney.ToString());
            sbText.AppendFormat("&orderId={0}", sOrderID);
            sbText.AppendFormat("&ts={0}", ts);
            sbText.AppendFormat("&sid=s{0}", serverid);
            sbText.AppendFormat("&sign={0}", sSign);
            sbText.AppendFormat("&account={0}", sUserID);

            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);
        }
Esempio n. 15
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string game  = "yjxy";                    //游戏简称
            string agent = "dao50";                   //合作方简称,由双方协商确定
            string user  = sUserID;
            string order = sOrderID.Substring(0, 30); //订单号,不允许超过30位

            int    iMoney = Convert.ToInt32(dMoney);
            string money  = iMoney.ToString();

            string        server      = sGame.Replace("yjxy", "S");//游戏服,为 Sn 的格式,n 为大于/等于 1 的整数,注意“S”为大写
            string        key         = "fadfadf%dfd$DFADFASFDdfdfa$D";
            string        sGamePayUrl = "http://pay.union.qq499.com:8029/pay_sync_togame.php";
            long          lTime       = (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000;
            string        time        = lTime.ToString();
            StringBuilder sbText      = new StringBuilder();

            sbText.Append(key);
            sbText.Append(agent);
            sbText.Append(money);
            sbText.Append(time);
            sbText.Append(order);
            sbText.Append(user);
            sbText.Append(game);

            string sSign = ProvideCommon.MD5(sbText.ToString());//md5($key.$agent.$money.$time.$order.urlencode($user).$game)

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("game={0}&agent={1}&user={2}&order={3}&money={4}&server={5}&time={6}&sign={7}",
                                game, agent, user, order, money, server, time, 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);
        }
Esempio n. 16
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        platform = "dao50";
            string        gkey     = "qfz";
            string        skey     = GetServerID(sGame);
            string        time     = ProvideCommon.getTime().ToString();
            StringBuilder sbText   = new StringBuilder();

            sbText.Append(sUserID);
            sbText.Append(platform);
            sbText.Append(gkey);
            sbText.Append(skey);
            sbText.Append(time);
            sbText.Append(sOrderID);
            string coins = "";

            sbText.Append(coins);
            string money = "";

            sbText.Append(money);
            sbText.Append("#");
            string pkey = "eX@V1IHi2kuIGV4aGNhbmdlX24(^^ki*UL9LDOdl2kio";

            sbText.Append(pkey);
            string sign    = ProvideCommon.MD5(sbText.ToString());//md5($uid.$platform.$gkey.$skey.$time.$order_id.$coins.$money'#'.$pkey)
            string TranURL = string.Format("http://{0}.qfz.dao50.com/exchange.html", skey);

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("gkey={0}&skey={1}&platform={2}&order_id={3}&uid={4}&coins={5}&money={6}&time={7}&sign={8}",
                                gkey, skey, platform, sOrderID, sUserID, coins, money, time, sign);
            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);
        }
Esempio n. 17
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string game  = "wwsg";                    //游戏简称
            string agent = "dao50";                   //合作方简称,由双方协商确定
            string user  = sUserID;
            string order = sOrderID.Substring(0, 30); //订单号,不允许超过30位

            int    iMoney = Convert.ToInt32(dMoney);
            string money  = iMoney.ToString();

            string        server      = sGame.Replace("wwsg", "S");//游戏服,为 Sn 的格式,n 为大于/等于 1 的整数,注意“S”为大写
            string        key         = "cuensoudcbw9eu34h9asgrb394grr3";
            string        sGamePayUrl = "http://pay.union.qq499.com:8029/pay_sync_togame.php";
            string        time        = ProvideCommon.getTime().ToString();//标准时间戳
            StringBuilder sbText      = new StringBuilder();

            sbText.Append(order);
            sbText.Append(user);
            sbText.Append(server);
            sbText.Append(game);
            sbText.Append(key);
            sbText.Append(agent);
            sbText.Append(time);
            sbText.Append(money);

            string sSign = ProvideCommon.MD5(sbText.ToString());//$sign = md5($order.urlencode($user).$server.$game.$key.$agent.$time.$money)

            sbText.Remove(0, sbText.Length);
            sbText.AppendFormat("game={0}&agent={1}&user={2}&order={3}&money={4}&server={5}&time={6}&sign={7}",
                                game, agent, user, order, money, server, time, 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);
        }
Esempio n. 18
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      = "gO^S%&RYL:#JBE%ASJ#jdl!@)^r12%jkmftz";
            StringBuilder sbText   = new StringBuilder();

            sbText.AppendFormat("[{0}-", key);
            sbText.AppendFormat("{0}-", sUserID);
            sbText.AppendFormat("{0}-", "1");
            sbText.AppendFormat("{0}-", iMoney.ToString());
            sbText.AppendFormat("{0}]", paytime);
            string sSign = ProvideCommon.MD5(sbText.ToString());    //md5(“$accname|$paytime|$gold|$serverid|密钥”)

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

            // sbText.AppendFormat("accname={0}&paytime={1}&gold={2}&billno={3}&serverid={4}&sign={5}", sUserID, paytime, gold.ToString(), sOrderID, serverid, sSign);
            sbText.AppendFormat("userName={0}", sUserID);
            sbText.AppendFormat("&goodsId={0}", 1);
            sbText.AppendFormat("&num={0}", iMoney);
            sbText.AppendFormat("&time={0}", paytime);
            sbText.AppendFormat("&sign={0}", sSign);
            sbText.AppendFormat("&orderId={0}", sOrderID);
            sbText.AppendFormat("&source={0}", "dao50");
            sbText.AppendFormat("&serverId={0}", "s" + serverid);

            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);
        }
Esempio n. 19
0
        public static string Login(string sUserID, string sGame)
        {
            string        login_ts      = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            string        login_key     = "2157655494752420761";
            string        user_identity = "-1";
            string        user_ip       = ProvideCommon.GetRealIP();
            StringBuilder sbText        = new StringBuilder();

            sbText.AppendFormat("{0}|{1}|{2}|{3}|{4}", sp_id, sUserID, login_ts, user_ip, login_key);
            string sign_str = ProvideCommon.MD5(sbText.ToString()).ToLower();//MD5(sp_id|user_id|login_ts|user_ip|login_key)

            sbText.Remove(0, sbText.Length);
            string sLoginUrl = "http://login.ss517.com/xdj/uniteGameLoginBackCookieValues.htm";

            sbText.AppendFormat("sp_id={0}", sp_id);
            sbText.AppendFormat("&user_id={0}", sUserID);
            sbText.AppendFormat("&user_name={0}", sUserID);
            sbText.AppendFormat("&user_identity={0}", user_identity);
            sbText.AppendFormat("&user_ip={0}", user_ip);
            sbText.AppendFormat("&login_ts={0}", HttpUtility.UrlEncode(login_ts));
            sbText.AppendFormat("&sign_str={0}", sign_str);
            sbText.Append("&game_id=3");
            string sValKey = ProvideCommon.GetPageInfoByPost(sLoginUrl, sbText.ToString(), "UTF-8");
            string sUrl    = string.Empty;

            if (sValKey.Length > 2)
            {
                string prizeServerId = ServerName(sGame);//区服编号
                sUrl = string.Format("{2}?{0}&{1}", prizeServerId, sValKey, ServerUrl(sGame));
            }
            else
            {
                sUrl = sValKey;
            }
            return(sUrl);
        }