Example #1
0
        public double CalcularTaxa(Transacao _transacao)
        {
            MDR Mdr = _mdrRepository.RetornarMDR().FirstOrDefault(mdr => mdr.Adquirente[mdr.Adquirente.Length - 1] == _transacao.Adquirente);

            Taxa taxa = Mdr.Taxas.FirstOrDefault(_taxa => _taxa.Bandeira == _transacao.Bandeira);

            if (_transacao.Tipo == "Credito")
            {
                return(CalcularTaxaCredito(_transacao, taxa));
            }

            if (_transacao.Tipo == "Debito")
            {
                return(CalcularTaxaDebito(_transacao, taxa));
            }

            return(0);
        }
 public IActionResult Get()
 {
     return(Ok(_mdrRepository.RetornarMDR()));
 }