Exemple #1
0
 public bool IsCardNumberValid()
 {
     if (CardValidator.IsCardNumberValid(this.CardNumber) == false)
     {
         return(false);
     }
     return(true);
 }
Exemple #2
0
        /// <summary>
        ///     Validates and reports the findings of the card number and expiration date validation.
        /// </summary>
        /// <param name="localTime">The current date/time stamp of the transaction.</param>
        /// <returns>Boolean - if true, the card number and date are valid.</returns>
        public bool IsCardValid(DateTime localTime)
        {
            if (!CardValidator.IsCardNumberValid(CardNumber))
            {
                return(false);
            }

            if (CardHasExpired(localTime))
            {
                return(false);
            }

            return(true);
        }