public void ProcessRequest(HttpContext context) { if (context.Request.HttpMethod == "POST") { string sChannle = CYRequest.GetFormString("Channel"); string sPhone = CYRequest.GetFormString("Phone"); string sAccount = CYRequest.GetFormString("Account"); string sPrice = CYRequest.GetFormString("Price"); decimal dPrice = 0; decimal.TryParse(sPrice, out dPrice); string sCount = CYRequest.GetFormString("Count"); int iCount = 0; int.TryParse(sCount, out iCount); string sGame = CYRequest.GetFormString("Game"); string sUrl = string.Empty; if (sGame == "" || sGame == "unsafe string") { sUrl = YeePayBuy.PayBegin(sChannle, sPhone, sAccount, dPrice, iCount); } else { string sGameName = sGame.Split('|')[0]; string sTranIP = ProvideCommon.GetRealIP(); string sPTranID = TransPBLL.PointSalesInit(sChannle, sPhone, sAccount, dPrice, iCount, sTranIP);//订单号 int iPayUserID = UserBll.UserIDSel(sAccount); decimal dFeeScale = ChannelBLL.FeeScaleSel(sChannle); //int iPrice = Convert.ToInt32(dPrice); int iGamePoints = Convert.ToInt32(dPrice * 10 * dFeeScale); string sGTranID = TransGBLL.GameSalesInit(sGameName, iGamePoints, sAccount, sPhone, iPayUserID, sTranIP); TranQuickBLL.TranQuickAdd(sGTranID, sPTranID); sUrl = YeePayBuy.QuickPayBegin(sPTranID, sChannle, sAccount, dPrice, sGame); } context.Response.Redirect(sUrl, true); } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/xml"; StringBuilder sbXml = new StringBuilder("<?xml version=\"1.0\" encoding=\"utf-8\"?>"); sbXml.Append("<response>"); string sBeginDate = CYRequest.GetString("date"); if (sBeginDate == "" || sBeginDate == "unsafe string") { sbXml.Append("<result>0</result>"); } else { string sSign = CYRequest.GetString("sign"); if (sSign == "" || sSign == "unsafe string") { sbXml.Append("<result>0</result>"); } else { if (hysjGame.signVal(sBeginDate, sSign)) { IFormatProvider format = new System.Globalization.CultureInfo("zh-CN"); string TarStr = "yyyyMMdd"; DateTime dBeginDate = DateTime.ParseExact(sBeginDate, TarStr, format); DateTime dEndDate = dBeginDate.AddDays(1); int iGameID = 6; int iGamePoints = TransGBLL.TransSelGPointsByGame(iGameID, dBeginDate, dEndDate); int iPrice = iGamePoints / 10; sbXml.Append("<result>1</result>"); sbXml.Append("<exchangeRate>10</exchangeRate>"); sbXml.AppendFormat("<localMoneyAmount>{0}</localMoneyAmount>", iPrice.ToString("f2")); sbXml.AppendFormat("<gameMoneyAmount>{0}</gameMoneyAmount>", iGamePoints); } else { sbXml.Append("<result>0</result>"); } } } sbXml.Append("</response>"); context.Response.Write(sbXml.ToString()); }
public void ProcessRequest(HttpContext context) { if (context.Request.HttpMethod == "POST") { string sFromHost = context.Request.UrlReferrer.Host; context.Response.Cookies["fromhost"].Value = sFromHost; context.Response.Cookies["fromhost"].Expires = DateTime.Now.AddHours(1); string sAccount = CYRequest.GetFormString("quickaccount");//充值账号 int iUserID = UserBll.UserIDSel(sAccount); if (iUserID < 1000) { context.Response.Write("<script>alert('充值账号不存在!');</script>"); return; } string sPayNums = CYRequest.GetFormString("quickpayprice");//充值金额 decimal dPrice = 0; decimal.TryParse(sPayNums, out dPrice); if (dPrice < 10) { context.Response.Redirect("PayPErr.aspx?err=204"); return; } string sGameAbbre = CYRequest.GetFormString("quickservername"); string sGameIsLogin = PayAll.ValUserLoginGame(sGameAbbre, iUserID.ToString()); if ("1" == sGameIsLogin) { context.Response.Redirect("PayGErr.aspx?err=202"); return; } string sGameAbbreC = string.Empty; if (sGameAbbre.IndexOf("sq") == -1) { sGameAbbreC = sGameAbbre; } else { string sRoleID = CYRequest.GetFormString("quickrole"); sGameAbbreC = string.Format("{0}|{1}", sGameAbbre, sRoleID); } string sPhone = CYRequest.GetFormString("quickphone"); string sChannel = CYRequest.GetFormString("quickchannel"); int iCount = 1; string sBankName = string.Empty; if (sChannel == "ibank") { sBankName = CYRequest.GetFormString("quickbank"); } string sPayDirect = string.Empty; if (sChannel == "tenpay") { string sTranIP = ProvideCommon.GetRealIP(); string sPTranID = TransPBLL.PointSalesInit(sChannel, sPhone, sAccount, dPrice, iCount, sTranIP); decimal dFeeScale = ChannelBLL.FeeScaleSel(sChannel); int iGamePoints = System.Convert.ToInt32(dPrice * 10 * dFeeScale); int iPayUserID = UserBll.UserIDSel(sAccount); string sGTranID = TransGBLL.GameSalesInit(sGameAbbre, iGamePoints, sAccount, sPhone, iPayUserID, sTranIP); TranQuickBLL.TranQuickAdd(sGTranID, sPTranID); sPayDirect = TenPayBuy.QuickPayBegin(sPTranID, sAccount, dPrice, sGameAbbreC, context); } else if (sChannel == "szfphone") { string sTranIP = ProvideCommon.GetRealIP(); string sPTranID = TransPBLL.PointSalesInit(sChannel, sPhone, sAccount, dPrice, iCount, sTranIP); decimal dFeeScale = ChannelBLL.FeeScaleSel(sChannel); int iGamePoints = System.Convert.ToInt32(dPrice * 10 * dFeeScale); int iPayUserID = UserBll.UserIDSel(sAccount); string sGTranID = TransGBLL.GameSalesInit(sGameAbbre, iGamePoints, sAccount, sPhone, iPayUserID, sTranIP); TranQuickBLL.TranQuickAdd(sGTranID, sPTranID); string cardTypeCombine = CYRequest.GetFormString("quickcardTypeCombine"); sPayDirect = SzfPayBuy.QuickPayBegin(sPTranID, sAccount, dPrice, sGameAbbreC, "0", cardTypeCombine); } else { sPayDirect = PayAll.QuickPay(sChannel, sPhone, sAccount, dPrice, iCount, sBankName, sGameAbbreC); } context.Response.Write(sPayDirect); } }
protected string GTransUser(int iUserID, int iPage, int iNum) { return(TransGBLL.UserTranSelByUID(iUserID, iPage, iNum)); }
protected void Page_Load(object sender, EventArgs e) { string sTranID = CYRequest.GetQueryString("TranID"); int iPayUserID = TransGBLL.TransSelGUserIDByTID(sTranID); sPayAccount = UserBll.AccountSel(iPayUserID).Trim(); iGamePoints = TransGBLL.TransGamePointsSelByTID(sTranID); string sAbbre = CYRequest.GetQueryString("gn"); string sType = CYRequest.GetQueryString("type"); string sGAbbre = GameInfoBLL.GameInfoAbbreSel(sAbbre).Trim(); switch (sGAbbre) { case "sssg": sGameName = "盛世三国"; sGameM = "银(注:1000银=1锭)"; break; case "sxd": sGameName = "神仙道"; sGameM = "元宝"; break; case "lj": sGameName = "龙将"; sGameM = "金币"; break; case "yjxy": sGameName = "一剑轩辕"; sGameM = "元宝"; break; case "dxz": sGameName = "大侠传"; sGameM = "黄金"; break; case "djj": sGameName = "大将军"; sGameM = "黄金"; break; case "txj": sGameName = "天行剑"; sGameM = "元宝"; break; case "sjsg": sGameName = "神将三国"; sGameM = "元宝"; break; case "tzcq": sGameName = "天尊传奇"; sGameM = "元宝"; break; case "zsg": sGameName = "战三国"; sGameM = "元宝"; break; case "wssg": sGameName = "无双三国"; sGameM = "元宝"; break; case "by": sGameName = "霸域"; sGameM = "元宝"; break; case "mxqy": sGameName = "冒险契约"; sGameM = "金币"; break; case "swjt": sGameName = "神武九天"; sGameM = "元宝"; break; case "gcld": sGameName = "攻城掠地"; sGameM = "金币"; break; case "tjz": sGameName = "天劫传"; sGameM = "元宝"; break; case "khbd": sGameName = "葵花宝典"; sGameM = "元宝"; break; case "sglj": sGameName = "三国论剑"; sGameM = "通宝"; break; case "hyjft": sGameName = "火影疾风坛"; sGameM = "金币"; break; case "llsg": sGameName = "龙狼三国"; sGameM = "黄金"; break; case "nslm": sGameName = "女神联盟"; sGameM = "钻石"; break; case "rxzt": sGameName = "热血遮天"; sGameM = "元宝"; break; case "ahxy": sGameName = "暗黑西游"; sGameM = "元宝"; break; case "mhxy": sGameName = "梦回轩辕"; sGameM = "元宝"; break; case "sxj": sGameName = "神仙劫"; sGameM = "元宝"; break; case "zwj": sGameName = "最无极"; sGameM = "元宝"; break; case "qxz": sGameName = "群侠传"; sGameM = "元宝"; break; case "qszg": sGameName = "骑士战歌"; sGameM = "金币"; break; case "wwsg": sGameName = "威武三国"; sGameM = "元宝"; break; case "dntg": sGameName = "大闹天宫"; sGameM = "元宝"; break; case "ahxx": sGameName = "暗黑修仙"; sGameM = "元宝"; break; case "jjp": sGameName = "将军破"; sGameM = "元宝"; break; case "sgyjz": sGameName = "三国英杰传"; sGameM = "金币"; break; case "dtgzt": sGameName = "太古遮天"; sGameM = "元宝"; break; case "dtgzter": sGameName = "太古遮天2"; sGameM = "元宝"; break; } if ("q" == sType) { sAccount = sPayAccount; iUserPoints = UserPointsBLL.UPointAllSel(iPayUserID); } else { int iUserID = GetUserID(); if (iUserID > 999) { iUserPoints = UserPointsBLL.UPointAllSel(iUserID); sAccount = GetAccount(); } } SetPoints(iUserPoints); string sFromHost = GetFromHost(); if (sFromHost.Length > 5) { string sServerNum = sAbbre.Replace(sGAbbre, ""); string sQueryString = string.Format("{0}|{1}|{2}|{3}|{4}|{5}|{6}|{7}", sTranID, sGameName, sServerNum, sPayAccount, sAccount, iGamePoints, iUserPoints, sGameM); string sEncodeQueryString = Server.UrlEncode(sQueryString); string sGoUrl = string.Format("http://{0}/PayGSucc.html?{1}", sFromHost, sEncodeQueryString); Response.Redirect(sGoUrl, true); return; } }