private bool IsCardTester(PaymentForm pf, string from) { if (!Util.IsHosted || !pf.CreditCard.HasValue()) { return(false); } var hash = Pbkdf2Hasher.HashString(pf.CreditCard); var db = DbUtil.Db; db.InsertIpLog(HttpContext.Current.Request.UserHostAddress, hash); if (pf.IsProblemUser()) { return(OnlineRegController.LogRogueUser("Problem User", from)); } var iscardtester = ConfigurationManager.AppSettings["IsCardTester"]; if (!iscardtester.HasValue()) { return(false); } var result = db.Connection.ExecuteScalar <string>(iscardtester, new { ip = HttpContext.Current.Request.UserHostAddress }); if (result.Equal("OK")) { return(false); } return(OnlineRegController.LogRogueUser(result, from)); }
private bool IsCardTester(PaymentForm pf, string from) { if (!Util.IsHosted || !Util.HasValue(pf.CreditCard)) { return(false); } DbUtil.Db.InsertIpLog(HttpContext.Current.Request.UserHostAddress, pf.CreditCard.Md5Hash()); if (pf.IsProblemUser()) { return(LogRogueUser("Problem User", from)); } var iscardtester = ConfigurationManager.AppSettings["IsCardTester"]; var result = DbUtil.Db.Connection.ExecuteScalar <string>(iscardtester, new { ip = HttpContext.Current.Request.UserHostAddress }); if (result.Equal("OK")) { return(false); } return(LogRogueUser(result, from)); }