public static string GameisLogin(string sUserID, string sGameAbbre) { string server_id = GetServerID(sGameAbbre);//游戏各个分区的编号,一区为1,二区为2 string time = ProvideCommon.getTime().ToString(); string sKey = "daaa5376-b6bb-11e2-87ff-842b2b627011"; StringBuilder sbText = new StringBuilder(); sbText.AppendFormat("{0}|{1}|{2}|{3}", sUserID, server_id, time, sKey); string sign = ProvideCommon.MD5(sbText.ToString());//md5( $uid . '|' . $server_id . '|' . $time . '|' . $key ) sbText.Remove(0, sbText.Length); sbText.AppendFormat("http://user.by.dao50.com/auth/dao50/check.php?uid={0}&server_id={1}&time={2}&sign={3}", sUserID, server_id, time, sign); string sUrl = sbText.ToString(); string sRes = ProvideCommon.GetPageInfo(sUrl); string sReturn = string.Empty; if (sRes == "0") { sReturn = "1"; } else { sReturn = "0"; } return(sReturn); }
public static string GameisLogin(string sUserID, string sGameAbbre) { string server_id = GetServerID(sGameAbbre);//游戏各个分区的编号,一区为1,二区为2 string sKey = "1ovPBxOkGKX"; StringBuilder sbText = new StringBuilder(); sbText.AppendFormat("{0}{1}{2}", sUserID, server_id, sKey); string sign = ProvideCommon.MD5(sbText.ToString());//md5($u.$s.$key) sbText.Remove(0, sbText.Length); sbText.AppendFormat("http://s{0}.nz.dao50.com/api/active.php?u={1}&s={0}&sign={2}", server_id, sUserID, sign); string sUrl = sbText.ToString(); string sRes = ProvideCommon.GetPageInfo(sUrl); string sReturn = string.Empty; if (sRes == "0") { sReturn = "1"; } else { sReturn = "0"; } return(sReturn); }
public static string GameisLogin(string sUserID, string sGameAbbre) { string sReturn = string.Empty; string op_id = "115"; string sid = GetServerID(sGameAbbre); string account = sUserID; string time = ProvideCommon.getTime().ToString(); string sAuth = string.Format("op_id={0}&sid={1}&game_id=36&account={2}&time={3}", op_id, sid, account, time); string sBase64Auth = Base64.EncodeBase64(sAuth); string sVerify = ProvideCommon.MD5(string.Format("{0}{1}", sBase64Auth, key)); string sPayUrl = string.Format("http://up.uuzu.com/api/commonAPI/roleverify?auth={0}&verify={1}", sBase64Auth, sVerify); string sRes = ProvideCommon.GetPageInfo(sPayUrl); try { JSONObject json = JSONConvert.DeserializeObject(sRes); string sCode = json["status"].ToString(); switch (sCode) { case "8": sReturn = "1"; break; default: sReturn = sRes; break; } } finally { JSONConvert.clearJson(); } return(sReturn); }
private const string key = "{b779f2dd-d532-3566-e0ab-9d3312f20919}";//"{D4EE863A-3714-4EE9-9F04-C7E3DC3E9924}"; public static string Login(string sUserID, string sGame, string sSource) { string user = sUserID; string time = ProvideCommon.getTime().ToString();//标准时间戳 int iUserID = 0; int.TryParse(sUserID, out iUserID); string sRegDate = UserBll.RegTimeSel(iUserID); string sRegDateC = ProvideCommon.getTime(DateTime.Parse(sRegDate)).ToString(); StringBuilder sbText = new StringBuilder(); sbText.Append(user); sbText.AppendFormat("_{0}_", time); string hash = string.Empty; if (sSource != null && sSource.Length > 0) { sbText.AppendFormat("{0}_", sSource); } sbText.Append(key); hash = ProvideCommon.MD5(sbText.ToString());//md5(user_time_平台密钥) sbText.Remove(0, sbText.Length); string serverdomain = GetDomain(sGame); sbText.AppendFormat("http://{0}/login_api.php?", serverdomain); sbText.AppendFormat("user={0}&", user); sbText.AppendFormat("time={0}&", time); sbText.AppendFormat("hash={0}&", hash); sbText.AppendFormat("source={0}&", sSource); sbText.AppendFormat("regdate={0}&", sRegDateC); sbText.Append("non_kid=1"); string sUrl = sbText.ToString(); return(sUrl); }
public static string GameisLogin(string sUserID, string sGameAbbre) { string spid = "dao50";//平台id string gameid = "4"; string serverid = GetServerID(sGameAbbre); string key = "qrEyrtZc9aBW0z5i"; StringBuilder sbText = new StringBuilder(); sbText.AppendFormat("{0}|", spid); sbText.AppendFormat("{0}|", gameid); sbText.AppendFormat("{0}|", serverid); sbText.AppendFormat("{0}|", sUserID); sbText.Append(key); string sign = ProvideCommon.MD5(sbText.ToString()).ToLower();//sign = md5(spid|gameid|serverid|userid|key) string sHost = GetDomain(sGameAbbre); string preUrl = string.Format("http://mid.gamefy.cn/union_mid/query_user?userid={0}&spid={1}&gameid={2}&serverid={3}&sign={4}", sUserID, spid, gameid, serverid, sign); string sRes = ProvideCommon.GetPageInfo(preUrl); string sReturn = string.Empty; string sRet = ProvideCommon.getJsonValue("code", sRes); if (sRet == "2001") { sReturn = "1"; } else { sReturn = sRet; } return(sReturn); }
public static string GetNewCode(string sUserID, string sGameAbbre, string sCodeType) { string spid = "lin"; string time = ProvideCommon.getTime().ToString(); string server_num = GetServerID(sGameAbbre); string key = "5c22fb494ba87294287fe5e743a7fe07"; StringBuilder sbText = new StringBuilder(); sbText.AppendFormat("{0}", sUserID); sbText.AppendFormat("{0}", spid); sbText.AppendFormat("{0}", server_num); sbText.AppendFormat("{0}", sCodeType);//0:新手卡 1:手机绑定卡 sbText.AppendFormat("{0}", time); sbText.AppendFormat("{0}", key); string sSign = ProvideCommon.MD5(sbText.ToString());//($user.$spid.$server_num.$type.$time.KEY) sbText.Remove(0, sbText.Length); sbText.AppendFormat("http://s{0}.ahxx.dao50.com/getcard.php?", server_num); sbText.AppendFormat("spid={0}", spid); sbText.AppendFormat("&user={0}", sUserID); sbText.AppendFormat("&server_num={0}", server_num); sbText.AppendFormat("&type={0}", sCodeType); sbText.AppendFormat("&time={0}", time); sbText.AppendFormat("&sign={0}", sSign); string sRes = ProvideCommon.GetPageInfo(sbText.ToString(), "UTF-8"); return(sRes); }
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); }
public static string GameisLogin(string sUserID, string sGameAbbre) { string key = "siawVVD8vDf834jFiek"; string server_num = GetServerID(sGameAbbre); StringBuilder sbText = new StringBuilder(); sbText.AppendFormat("{0}", sUserID); sbText.AppendFormat("{0}", key); string sign = ProvideCommon.MD5(sbText.ToString());//($username.$server_num.KEY) sbText.Remove(0, sbText.Length); sbText.AppendFormat("http://s{0}.jjp.dao50.com/pay/QueryInfo?", server_num); sbText.AppendFormat("account={0}", sUserID); sbText.AppendFormat("&sign={0}", sign); string sRes = ProvideCommon.GetPageInfo(sbText.ToString()); string sReturn = string.Empty; string ssres = ProvideCommon.getJsonValue("code", sRes); switch (ssres) { case "1001": sReturn = "1"; break; default: sReturn = "0"; break; } return(sReturn); }
public static string Login(string sUserID, string sGame) { string center_id = "1073"; string serverid = GetServerID(sGame); string fcm = "1"; string time = ProvideCommon.getTime().ToString(); string key = "siawVVD8vDf834jFiek"; StringBuilder sbText = new StringBuilder(); sbText.AppendFormat("{0}", sUserID); sbText.AppendFormat("{0}", center_id); sbText.AppendFormat("{0}", serverid); sbText.AppendFormat("{0}", fcm); sbText.AppendFormat("{0}", time); sbText.AppendFormat("{0}", key); string sign = ProvideCommon.MD5(sbText.ToString());//md5 ( username . server_num . KEY . time ) sbText.Remove(0, sbText.Length); sbText.AppendFormat("http://s{0}.jjp.dao50.com/inf_login.jsp?", serverid); sbText.AppendFormat("account={0}", sUserID); sbText.AppendFormat("¢er_id={0}", center_id); sbText.AppendFormat("&server_id={0}", serverid); sbText.AppendFormat("&fcm={0}", fcm); sbText.AppendFormat("&time={0}", time); sbText.AppendFormat("&sign={0}", sign); return(sbText.ToString()); }
public static string Login(string sUserID, string sGame) { string agentid = "15"; string TICKET_LOGIN = "******"; string serverid = GetServerID(sGame); string tstamp = ProvideCommon.getTime().ToString();//标准时间戳 string fcm = "1"; StringBuilder sbText = new StringBuilder(); sbText.Append(TICKET_LOGIN); sbText.Append(sUserID); sbText.Append(tstamp); sbText.Append(agentid); sbText.Append(serverid); sbText.Append(fcm); string ticket = ProvideCommon.MD5(sbText.ToString());//md5(API_SECURITY_TICKET_LOGIN + account + tstamp+ agentid + serverid +fcm) sbText.Remove(0, sbText.Length); sbText.Append("http://web.xlfc.dao50.com/user/start.php?"); sbText.AppendFormat("account={0}&", sUserID); sbText.AppendFormat("tstamp={0}&", tstamp); sbText.AppendFormat("agentid={0}&", agentid); sbText.AppendFormat("serverid={0}&", serverid); sbText.AppendFormat("fcm={0}&", fcm); sbText.AppendFormat("ticket={0}&", ticket); string sUrl = sbText.ToString(); return(sUrl); }
public static string GameisLogin(string sUserID, string sGameAbbre) { string sReturn = string.Empty; string TICKET_INFO = "dao50::XLFC::INFO::KEY::03IAM3DmCp8myAwfqWre"; string agentid = "15"; string serverid = GetServerID(sGameAbbre); string time = ProvideCommon.getTime().ToString(); StringBuilder sbText = new StringBuilder(); sbText.Append(TICKET_INFO); sbText.Append(time); sbText.Append(sUserID); string sign = ProvideCommon.MD5(sbText.ToString());//md5($API_SECURITY_TICKET_INFO,$time.$user_name) sbText.Remove(0, sbText.Length); string TranURL = "http://web.xlfc.dao50.com/api/info.player.php?"; sbText.Append(TranURL); sbText.AppendFormat("user_name={0}&", sUserID); sbText.AppendFormat("agentid={0}&", agentid); sbText.AppendFormat("serverid={0}&", serverid); sbText.AppendFormat("t={0}&", time); sbText.AppendFormat("s={0}", sign); string sRes = ProvideCommon.GetPageInfo(sbText.ToString()); if (sRes == "not found") { sReturn = "1"; } else { sReturn = "0"; } return(sReturn); }
public static string Pay(string sUserID, int iMoney, string sOrderID, string sGame, string ip, string otype) { string sid = GetServerID(sGame); //服务器编号 string account = sUserID; string oid = sOrderID.Substring(0, 32); //订单号 char (32) string money = iMoney.ToString(); string gold = (iMoney * 10).ToString(); string time = ProvideCommon.getTime().ToString(); StringBuilder sbText = new StringBuilder(); sbText.AppendFormat("tid={0}&", tid); sbText.AppendFormat("sid={0}&", sid); sbText.AppendFormat("account={0}&", account); sbText.AppendFormat("oid={0}&", oid); sbText.AppendFormat("otype={0}&", otype); sbText.AppendFormat("money={0}&", money); sbText.AppendFormat("gold={0}&", gold); sbText.AppendFormat("ip={0}&", ip); sbText.AppendFormat("time={0}", time); string auth = Base64.EncodeBase64(sbText.ToString()); string verify = ProvideCommon.MD5(string.Format("{0}{1}", auth, key)); string sUrl = string.Format("http://passport.9787.com/api/1/uinterface.php?action=charge&auth={0}&verify={1}", auth, verify); string sRes = ProvideCommon.GetPageInfo(sUrl); JSONObject json = JSONConvert.DeserializeObject(sRes); string result = json["result"].ToString(); JSONConvert.clearJson(); return(result); }
public static string GetNewCode(string sGame, string sUserID) { string sid = GetServerID(sGame);//服务器编号 string account = sUserID; string time = ProvideCommon.getTime().ToString(); StringBuilder sbText = new StringBuilder(); sbText.AppendFormat("tid={0}&", tid); sbText.AppendFormat("sid={0}&", sid); sbText.AppendFormat("account={0}&", account); sbText.AppendFormat("time={0}&", time); string auth = Base64.EncodeBase64(sbText.ToString()); string verify = ProvideCommon.MD5(string.Format("{0}{1}", auth, key)); string sUrl = string.Format("http://up.9787.com/api/1/uinterface.php?action=getNewCard&auth={0}&verify={1}", auth, verify); string sRes = ProvideCommon.GetPageInfo(sUrl); string sResult = string.Empty; JSONObject json = JSONConvert.DeserializeObject(sRes); string status = json["status"].ToString(); if (status == "-1" || status == "1") { sResult = json["card"].ToString(); } else { sResult = status; } JSONConvert.clearJson(); return(sResult); }
/// <summary> /// 账号不做处理加密密码 /// </summary> /// <param name="sAccount">账号</param> /// <param name="sPassWord">密码</param> /// <returns></returns> public static string PassWordMD5New(string sAccount, string sPassWord) { StringBuilder sbText = new StringBuilder(sAccount); sbText.Append(sPassWord); return(ProvideCommon.MD5(sbText.ToString())); }
public static string Login(string sUserID, string sGame, string sClient) { string spid = "lin"; string server_num = GetServerID(sGame); string fcm = "1"; string time = ProvideCommon.getTime().ToString(); string key = "5c22fb494ba87294287fe5e743a7fe07"; StringBuilder sbText = new StringBuilder(); sbText.AppendFormat("{0}", sUserID); sbText.AppendFormat("{0}", server_num); sbText.AppendFormat("{0}", key); sbText.AppendFormat("{0}", time); string sign = ProvideCommon.MD5(sbText.ToString());//md5 ( username . server_num . KEY . time ) sbText.Remove(0, sbText.Length); sbText.AppendFormat("http://s{0}.ahxx.dao50.com/login.php?", server_num); sbText.AppendFormat("spid={0}", spid); sbText.AppendFormat("&username={0}", sUserID); sbText.AppendFormat("&server_num={0}", server_num); sbText.AppendFormat("&fcm={0}", fcm); sbText.AppendFormat("&time={0}", time); sbText.AppendFormat("&sign={0}", sign); sbText.AppendFormat("&client={0}", sClient); return(sbText.ToString()); }
public static string GameisLogin(string sUserID, string sGameAbbre) { string serverid = GetServerID(sGameAbbre); string ts = ProvideCommon.getTime().ToString(); string key = "ySfWw4F0AVyK7TqyfxPnjOtuVCZLOvSu"; StringBuilder sbText = new StringBuilder(); sbText.AppendFormat("{0}", sUserID); sbText.AppendFormat("{0}", ts); sbText.AppendFormat("{0}", key); string ticket = ProvideCommon.MD5(sbText.ToString());//md5(“$accname|$ts|$serverid|密钥”) sbText.Remove(0, sbText.Length); sbText.AppendFormat("http://s{0}.wwsg.dao50.com/api/union/user_info.php?", serverid); sbText.AppendFormat("username={0}", sUserID); sbText.AppendFormat("&time={0}", ts); sbText.AppendFormat("&flag={0}", ticket); string sUrl = sbText.ToString(); string sRes = ProvideCommon.GetPageInfo(sUrl); string sJsonRes = ProvideCommon.getJsonValue("code", sRes); string sReturn = string.Empty; switch (sJsonRes) { case "-3": sReturn = "1"; break; default: sReturn = "0"; break; } return(sReturn); }
public static string GameisLogin(string sUserID, string sGameAbbre) { string key = "5c22fb494ba87294287fe5e743a7fe07"; string spid = "lin"; string server_num = GetServerID(sGameAbbre); StringBuilder sbText = new StringBuilder(); sbText.AppendFormat("{0}", sUserID); sbText.AppendFormat("{0}", server_num); sbText.AppendFormat("{0}", key); string sign = ProvideCommon.MD5(sbText.ToString());//($username.$server_num.KEY) sbText.Remove(0, sbText.Length); sbText.AppendFormat("http://s{0}.ahxx.dao50.com/user.php?", server_num); sbText.AppendFormat("spid={0}", spid); sbText.AppendFormat("&username={0}", sUserID); sbText.AppendFormat("&server_num={0}", server_num); sbText.AppendFormat("&sign={0}", sign); string sRes = ProvideCommon.GetPageInfo(sbText.ToString()); string sReturn = string.Empty; switch (sRes) { case "0": case "5": sReturn = "1"; break; default: sReturn = "0"; break; } return(sReturn); }
public static string Login(string sUserID, string sGame, string sLoginType) { string platform = "dao50"; string gkey = "qfz"; string skey = GetServerID(sGame); string time = ProvideCommon.getTime().ToString(); string is_adult = "1"; StringBuilder sbText = new StringBuilder(); sbText.Append(sUserID); sbText.Append(platform); sbText.Append(gkey); sbText.Append(skey); sbText.Append(time); sbText.Append(is_adult); sbText.Append("#"); string lkey = "XV1IHNkM2FzZGZrIG8g(*(*^986j2lu2lu8$aWdu1fhi"; sbText.Append(lkey); string sign = ProvideCommon.MD5(sbText.ToString());//md5($uid.$platform.$gkey.$skey.$time.$is_adult.'#'.$lkey) string back_url = "http://www.dao50.com/yxzq/qfz/"; string sGameUrl = string.Format("http://{3}.qfz.dao50.com/login.html?uid={0}&platform={1}&gkey={2}&skey={3}&time={4}&is_adult={8}&back_url={5}&type={6}&sign={7}", sUserID, platform, gkey, skey, time, back_url, sLoginType, sign, is_adult); return(sGameUrl); }
public static string GameisLogin(string sUserID, string sGameAbbre) { string serverid = GetServerID(sGameAbbre); string ts = ProvideCommon.getTime().ToString(); string key = "308494a405f92ca02c74d562aed83ce3"; StringBuilder sbText = new StringBuilder(); sbText.AppendFormat("{0}|", sUserID); sbText.AppendFormat("{0}|", ts); sbText.AppendFormat("{0}|", serverid); sbText.Append(key); string ticket = ProvideCommon.MD5(sbText.ToString());//md5(“$accname|$ts|$serverid|密钥”) sbText.Remove(0, sbText.Length); sbText.AppendFormat("http://s{0}.yjxy.dao50.com/intf/general/get_user_info.php?", serverid); sbText.AppendFormat("accname={0}", sUserID); sbText.AppendFormat("&ts={0}", ts); sbText.AppendFormat("&serverid={0}", serverid); sbText.AppendFormat("&sign={0}", ticket); string sUrl = sbText.ToString(); string sRes = ProvideCommon.GetPageInfo(sUrl); string sReturn = string.Empty; if (sRes.IndexOf("\"ret\":1") > -1) { sReturn = "1"; } else { sReturn = "0"; } return(sReturn); }
public static string GameisLogin(string sUserID, string sGameAbbre) { string sReturn = string.Empty; string platform = "dao50"; string gkey = "qfz"; string skey = GetServerID(sGameAbbre); 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("#"); string lkey = "XV1IHNkM2FzZGZrIG8g(*(*^986j2lu2lu8$aWdu1fhi"; sbText.Append(lkey); string sign = ProvideCommon.MD5(sbText.ToString());//$uid.$platform.$gkey.$skey.$time.'#'.$lkey string sQueryUrl = string.Format("http://{0}.qfz.dao50.com/checkuser.html?uid={1}&platform={1}&gkey={2}&skey={3}&time={4}&sign={5}", skey, sUserID, platform, gkey, skey, time, sign); string sRes = ProvideCommon.GetPageInfo(sQueryUrl); string sErrNo = ProvideCommon.getJsonValue("errno", sRes); if (sRes == "-1") { sReturn = "1"; } else { sReturn = sRes; } return(sReturn); }
public static string Login(string sUserID, string sGame) { string ubpartnerid = "dao50"; string gameid = "912000"; string serverid = getServerID(sGame); string username = sUserID; string idcard = "1"; string eventtime = DateTime.Now.ToString("yyyyMMddhhmmss"); string ubpartnerkey = "365ub-W6W1YKETLVH;JN?@=BI1CVT.G:<Tdao50"; StringBuilder sbText = new StringBuilder(); sbText.AppendFormat(string.Format("ubpartnerid={0}&", ubpartnerid)); sbText.AppendFormat(string.Format("gameid={0}&", gameid)); sbText.AppendFormat(string.Format("serverid={0}&", serverid)); sbText.AppendFormat(string.Format("username={0}&", username)); sbText.AppendFormat(string.Format("idcard={0}&", idcard)); sbText.AppendFormat(string.Format("eventtime={0}&", eventtime)); sbText.AppendFormat(string.Format("ubpartnerkey={0}", ubpartnerkey)); //MD5("ubpartnerid=&gameid=&serverid=&username=&idcard=&eventtime=&ubpartnerkey=".ToUpper()).ToUpper(); string sSign = ProvideCommon.MD5(sbText.ToString().ToUpper()).ToUpper(); sbText.Remove(0, sbText.Length); sbText.Append("http://api.365ub.com/loginbygetmethod.ashx?"); sbText.AppendFormat("ubpartnerid={0}", ubpartnerid); sbText.AppendFormat("&gameid={0}", gameid); sbText.AppendFormat("&serverid={0}", serverid); sbText.AppendFormat("&username={0}", sUserID); sbText.AppendFormat("&idcard={0}", idcard); sbText.AppendFormat("&eventtime={0}&realname=", eventtime); sbText.AppendFormat("&sign={0}", sSign); return(sbText.ToString()); }
public static string Login(string sUserID, string sGame) { string agentName = "dao50"; string TICKET_LOGIN = "******"; string serverid = GetServerID(sGame); string stamp = ProvideCommon.getTime().ToString();//标准时间戳 string fcm = "1"; StringBuilder sbText = new StringBuilder(); sbText.Append(TICKET_LOGIN); sbText.Append(sUserID); sbText.Append(stamp); sbText.Append(agentName); sbText.Append(serverid); sbText.Append(fcm); string flag = ProvideCommon.MD5(sbText.ToString());//md5(LOGIN_KEY + accountName + stamp + agentName + serverID + fcm) sbText.Remove(0, sbText.Length); sbText.Append("http://web.tgzt.mingchaoonline.com/api/v1/mc/start.php?"); sbText.AppendFormat("accountName={0}&", sUserID); sbText.AppendFormat("stamp={0}&", stamp); sbText.AppendFormat("agentName={0}&", agentName); sbText.AppendFormat("serverID={0}&", serverid); sbText.AppendFormat("fcm={0}&", fcm); sbText.AppendFormat("flag={0}", flag); string sUrl = sbText.ToString(); return(sUrl); }
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); }
public static string GameisLogin(string sUserID, string sGameAbbre) { string sReturn = string.Empty; string agentName = "dao50"; string TICKET_SEARCH = "dao50::TGZT::INFO::KEY::YSk99ZTjpXb2Nw"; string serverid = GetServerID(sGameAbbre); string stamp = ProvideCommon.getTime().ToString();//标准时间戳 StringBuilder sbText = new StringBuilder(); sbText.Append(TICKET_SEARCH); sbText.Append(sUserID); sbText.Append(agentName); sbText.Append(serverid); sbText.Append(stamp); string flag = ProvideCommon.MD5(sbText.ToString());//md5(SEARCH_KEY + accountName+ AgentName + serverID + stamp) sbText.Remove(0, sbText.Length); sbText.Append("http://web.tgzt.mingchaoonline.com/api/v1/mc/getAccountInfo.php?"); sbText.AppendFormat("accountName={0}&", sUserID); sbText.AppendFormat("agentName={0}&", agentName); sbText.AppendFormat("serverID={0}&", serverid); sbText.AppendFormat("stamp={0}&", stamp); sbText.AppendFormat("flag={0}", flag); string sRes = ProvideCommon.GetPageInfo(sbText.ToString()); if (sRes == "-3") { sReturn = "1"; } else { sReturn = "0"; } return(sReturn); }
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); }
public static string Login(string sUserID, string sGame) { string account = sUserID; string tstamp = ProvideCommon.getTime().ToString(); string fcm = "1";//0为未通过 1为通过 2未填写 string server_id = sGame.Replace("yjxy", ""); string GAME_TICKET_SUBFIX = "15bc795ee011b9b2f82b915a4c85ec73"; StringBuilder sbText = new StringBuilder(); sbText.Append(account); sbText.Append(tstamp); sbText.Append(fcm); sbText.Append(server_id); sbText.Append(GAME_TICKET_SUBFIX); string ticket = ProvideCommon.MD5(sbText.ToString());//md5(account+timestamp+fcm+server_id+GAME_TICKET_SUBFIX) sbText.Remove(0, sbText.Length); string sServerHost = ServerHost(sGame); sbText.AppendFormat("http://{0}/start.php?", sServerHost); sbText.AppendFormat("account={0}", account); sbText.AppendFormat("&tstamp={0}", tstamp); sbText.AppendFormat("&fcm={0}", fcm); sbText.AppendFormat("&server_id={0}", server_id); sbText.AppendFormat("&ticket={0}", ticket); return(sbText.ToString()); }
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); }
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); }
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); }
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); }