Beispiel #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));
        }