Ejemplo n.º 1
0
        private bool IsCardTester(PaymentForm pf, string from)
        {
            if (!Util.IsHosted || !pf.CreditCard.HasValue())
            {
                return(false);
            }

            var hash = Pbkdf2Hasher.HashString(pf.CreditCard);

            CurrentDatabase.InsertIpLog(Request.UserHostAddress, hash);

            if (pf.IsProblemUser())
            {
                return(LogRogueUser("Problem User", from));
            }

            var iscardtester = ConfigurationManager.AppSettings["IsCardTester"];

            if (!iscardtester.HasValue())
            {
                return(false);
            }
            var result = CurrentDatabase.Connection.ExecuteScalar <string>(iscardtester, new { ip = Request.UserHostAddress });

            if (result.Equal("OK"))
            {
                return(false);
            }

            return(LogRogueUser(result, from));
        }
Ejemplo n.º 2
0
        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(HttpContextFactory.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 = HttpContextFactory.Current.Request.UserHostAddress });

            if (result.Equal("OK"))
            {
                return(false);
            }
            return(OnlineRegController.LogRogueUser(result, from));
        }