public bool IsCardNumberValid() { if (CardValidator.IsCardNumberValid(this.CardNumber) == false) { return(false); } return(true); }
/// <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); }