Example #1
0
 /// <summary>
 /// Validate Bank Card Enterred
 /// </summary>
 /// <param name="card"></param>
 /// <returns></returns>
 public bool Authenticate(BankCard card)
 {
     ValidBankAccount = _cardRepository.ToList().SingleOrDefault(_ => _.CardId == card.CardId && _.PIN == card.PIN);
     if (ValidBankAccount != null)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Example #2
0
 private bool UpdateCardData(BankCard card)
 {
     _cardRepository.Remove(card);
     _cardRepository.Add(card);
     return(true);
 }
Example #3
0
 public ATMManager(BankCard enterredCard, IEnumerable <BankCard> cardRepository)
 {
     _cardRepository = cardRepository.ToList();
     _authenticator  = new CardAuthenticator(cardRepository);
     IsAuthenticated = _authenticator.Authenticate(enterredCard);
 }