Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
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);
        }
Ejemplo n.º 4
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;
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 6
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);
        }
Ejemplo n.º 7
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);
        }
Ejemplo n.º 8
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);
        }
Ejemplo n.º 9
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);
        }
Ejemplo n.º 10
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);
        }
Ejemplo n.º 11
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);
        }
Ejemplo n.º 12
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);
        }
Ejemplo n.º 13
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);
        }
Ejemplo n.º 14
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);
        }
Ejemplo n.º 15
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);
        }
Ejemplo n.º 16
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);
        }
Ejemplo n.º 17
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);
        }
Ejemplo n.º 18
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);
        }
Ejemplo n.º 19
0
        public static string Pay(string sUserID, int iMoney, string sOrderID, string sGame)
        {
            string        key          = "f06b9a55978836e041d174a616ebba25";
            string        unionCode    = "unionhysjdaowulin";
            string        sTranTime    = TransGBLL.TransTimeSelByTID(sOrderID);
            string        orderId      = ProvideCommon.getTime(DateTime.Parse(sTranTime)).ToString();
            string        userName     = HttpUtility.UrlEncode(sUserID);
            string        chargeTime   = DateTime.Now.ToString("yyyyMMddHHmmss");
            string        chargeMoney  = iMoney.ToString("f2");
            int           iGamePoints  = iMoney * 10;
            string        chargeAmount = iGamePoints.ToString();
            string        Gatewayid    = GetPaySeverID(sGame);
            string        Gameid       = "820";
            string        clientIp     = ProvideCommon.GetRealIP();
            StringBuilder sbText       = new StringBuilder();

            sbText.Append(unionCode);
            sbText.Append(orderId);
            sbText.Append(userName);
            sbText.Append(chargeTime);
            sbText.Append(chargeMoney);
            sbText.Append(chargeAmount);
            sbText.Append(Gatewayid);
            sbText.Append(Gameid);
            sbText.Append(key);
            string sign = ProvideCommon.MD5(sbText.ToString());//小写英文字母与数字组合,md5(unionCode+orderId+userName+chargeTime+chargeMoney+chargeAmount+gatewayId+gameId+key)注意:chargeMoney 参与md5 计算时应保留小数点两位,例如35 应该转换为35.00。key 由蓝港在线生成,告知联运方。

            sbText.Remove(0, sbText.Length);
            string serverdomain = GetDomain(sGame);
            string TranURL      = "http://59.151.39.189:8080/union_mid/charging.do";

            sbText.Append(TranURL);
            sbText.AppendFormat("?unionCode={0}&", unionCode);
            sbText.AppendFormat("orderId={0}&", orderId);
            sbText.AppendFormat("userName={0}&", userName);
            sbText.AppendFormat("chargeTime={0}&", chargeTime);
            sbText.AppendFormat("chargeMoney={0}&", chargeMoney);
            sbText.AppendFormat("chargeAmount={0}&", chargeAmount);
            sbText.AppendFormat("gatewayId={0}&", Gatewayid);
            sbText.AppendFormat("gameId={0}&", Gameid);
            sbText.AppendFormat("clientIp={0}&", clientIp);
            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);
        }
Ejemplo n.º 20
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  chargeid  = sOrderID.Substring(0, 32);
            string  payway    = "1";
            string  roleid    = GetRoleId(sUserID, sGame);
            decimal money     = Convert.ToInt32(dMoney * 10);
            decimal needmoney = Convert.ToInt32(dMoney);
            //string moneytype = "CNY";
            string        site   = GetSite(sGame);//"jydao50_0001"; //+serverid;
            string        key    = "QY569fdd-56812ef-loveWAN-7roadjy-25ea3495-7R53MYCNX-shenqu-lovedede7";
            StringBuilder sbText = new StringBuilder();

            sbText.AppendFormat("{0}", chargeid);
            sbText.AppendFormat("{0}", sUserID);
            sbText.AppendFormat("{0}", money);
            sbText.AppendFormat("{0}", payway);
            sbText.AppendFormat("{0}", needmoney);
            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://assist{0}.jy.dao50.com/chargemoney?", serverid);
            sbText.AppendFormat("chargeID={0}", chargeid);
            sbText.AppendFormat("&username={0}", sUserID);
            sbText.AppendFormat("&money={0}", money);
            sbText.AppendFormat("&payway={0}", payway);
            sbText.AppendFormat("&needmoney={0}", needmoney);
            sbText.Append("&moneytype=CNY");
            sbText.AppendFormat("&sign={0}", sSign);
            sbText.AppendFormat("&userid={0}", roleid);
            // sbText.AppendFormat("&timestamp={0}", timestamp);
            sbText.AppendFormat("&site={0}", site);

            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);
        }
Ejemplo n.º 21
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);
        }
Ejemplo n.º 22
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        accountid = sUserID;
            string        gameid    = "51";
            string        serverid  = GetServerID(sGame);
            int           iMoney    = Convert.ToInt32(dMoney);
            int           point     = iMoney * 10;
            string        giftcoin  = "0";
            string        timestamp = ProvideCommon.getTime().ToString();
            string        remark    = "0";
            string        order     = sOrderID.Substring(0, 30);//订单号,不允许超过30位
            StringBuilder sbText    = new StringBuilder();

            sbText.Append(accountid);
            sbText.Append(gameid);
            sbText.Append(serverid);
            sbText.Append(order);
            sbText.Append(point);
            sbText.Append(giftcoin);
            sbText.Append(timestamp);
            sbText.Append(remark);
            sbText.Append(secretkey);
            string sign = ProvideCommon.MD5(sbText.ToString());//MD5(accountid +gameid+ serverid +orderid+ point + giftcoin +timestamp+remark+secretkey)

            sbText.Remove(0, sbText.Length);
            string TranURL = "http://login.dao50.z.ucjoy.com:3333/pay.php?";

            sbText.Append(TranURL);
            sbText.AppendFormat("accountid={0}&", accountid);
            sbText.AppendFormat("gameid={0}&", gameid);
            sbText.AppendFormat("serverid={0}&", serverid);
            sbText.AppendFormat("orderid={0}&", order);
            sbText.AppendFormat("point={0}&", point.ToString());
            sbText.AppendFormat("giftcoin={0}&", giftcoin);
            sbText.AppendFormat("timestamp={0}&", timestamp);
            sbText.AppendFormat("remark={0}&", remark);
            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(), order, sRes, sGame, iUserID);
            return(sRes);
        }
Ejemplo n.º 23
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        p6_Status = "1";
            string        ptid      = "dao50";
            string        p1_MerId  = "90001";
            decimal       money     = Convert.ToInt32(dMoney * 10);
            string        key       = "D50!@#$%#@$SADFSwe8798JYQZ9^%$#&*@r087987234PAY";
            StringBuilder sbText    = new StringBuilder();

            sbText.AppendFormat("{0}", p1_MerId);
            sbText.AppendFormat("{0}", sUserID);
            sbText.AppendFormat("{0}", sOrderID);
            sbText.AppendFormat("{0}", dMoney);
            sbText.AppendFormat("{0}", serverid);
            sbText.AppendFormat("{0}", p6_Status);
            sbText.AppendFormat("{0}", money);
            sbText.AppendFormat("{0}", ptid);
            sbText.AppendFormat("{0}", key);
            string sSign = ProvideCommon.MD5(sbText.ToString());

            sbText.Remove(0, sbText.Length);
            sbText.Append("http://pay.jyqz.8641.com/payment.jsp?");
            sbText.AppendFormat("p1_MerId={0}", p1_MerId);
            sbText.AppendFormat("&p2_User={0}", sUserID);
            sbText.AppendFormat("&p3_Order={0}", sOrderID);
            sbText.AppendFormat("&p4_Amt={0}", dMoney);
            sbText.AppendFormat("&p5_Sid={0}", serverid);
            sbText.AppendFormat("&p6_Status={0}", p6_Status);
            sbText.AppendFormat("&p7_Coin={0}", money);
            sbText.AppendFormat("&p8_Ptid={0}", ptid);
            sbText.AppendFormat("&hmac={0}", sSign);
            string sRes    = ProvideCommon.GetPageInfo(sbText.ToString()).ToLower();
            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);
        }
Ejemplo n.º 24
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        p6_Status = "1";
            string        ptid      = "";
            string        p1_MerId  = "";
            decimal       money     = Convert.ToInt32(dMoney * 10);
            string        key       = "QY569fdd-56812ef-loveWAN-7roadjy-25ea3495-7R53MYCNX-shenqu-lovedede7";
            StringBuilder sbText    = new StringBuilder();

            sbText.AppendFormat("{0}", p1_MerId);
            sbText.AppendFormat("{0}", sUserID);
            sbText.AppendFormat("{0}", sOrderID);
            sbText.AppendFormat("{0}", dMoney);
            sbText.AppendFormat("{0}", serverid);
            sbText.AppendFormat("{0}", p6_Status);
            sbText.AppendFormat("{0}", money);
            sbText.AppendFormat("{0}", ptid);
            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.Append("http://pay.jyqz.cy.cn/pay.jsp?");
            sbText.AppendFormat("p1_MerId={0}", p1_MerId);
            sbText.AppendFormat("&p2_User={0}", sUserID);
            sbText.AppendFormat("&p3_Order={0}", sOrderID);
            sbText.AppendFormat("&p4_Amt={0}", dMoney);
            sbText.AppendFormat("&p5_Sid={0}", serverid);
            sbText.AppendFormat("&p6_Status={0}", p6_Status);
            sbText.AppendFormat("&p7_Coin={0}", money);
            sbText.AppendFormat("&p8_Ptid={0}", ptid);
            sbText.AppendFormat("&hmac={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);
        }
Ejemplo n.º 25
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame)
        {
            string        ubpartnerid  = "dao50";
            string        gameid       = "912000";
            string        serverid     = getServerID(sGame);
            string        username     = sUserID;
            string        eventtime    = DateTime.Now.ToString("yyyyMMddHHmmss");
            string        orderid      = sOrderID;
            int           iGameMoney   = Convert.ToInt32(dMoney * 10);
            string        gamemoney    = iGameMoney.ToString();
            string        responsetype = "1";
            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("orderid={0}&", orderid));
            sbText.AppendFormat(string.Format("gamemoney={0}&", gamemoney));
            sbText.AppendFormat(string.Format("responsetype={0}&", responsetype));
            sbText.AppendFormat(string.Format("ubpartnerkey={0}", ubpartnerkey));
            //Md5(ubpartnerid=&gameid=&serverid=&username=&eventtime=&orderid=&gamemoney=&responsetype=&ubpartnerkey=)
            string sSign = ProvideCommon.MD5(sbText.ToString().ToUpper()).ToUpper();

            sbText.Remove(0, sbText.Length);
            sbText.Append("http://api.365ub.com/pay.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("&orderid={0}", orderid);
            sbText.AppendFormat("&gamemoney={0}", gamemoney);
            sbText.AppendFormat("&responsetype={0}", responsetype);
            sbText.AppendFormat("&sign={0}", sSign);
            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);
        }
Ejemplo n.º 26
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);
        }
Ejemplo n.º 27
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);
        }
Ejemplo n.º 28
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);
        }
Ejemplo n.º 29
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);
        }
Ejemplo n.º 30
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);
        }