public void ValidarTransacao(Transaction transaction) { if (_serviceCard.ValidarCartao(transaction.Card.Number, transaction.Card.Password) != null || transaction.Card.HasPassword == false && _serviceCard.ValidarSaldo(transaction.Card.Limit, transaction.Amount)) { transaction.Card.Limit -= transaction.Amount; _repositoryTransaction.Add(transaction); _serviceCard.AtualizarCartao(transaction.Card); } }
public Card ValidarCartao(string number, string password) { return(_serviceCard.ValidarCartao(number, password)); }