public double CalculoTaxa(Transacao _transacao) { MDR Mdr = _mdrRepositorio.GetMDR().FirstOrDefault(mdr => mdr.Adquirente == _transacao.Adquirente.ToLower()); Taxa taxa = Mdr.Taxas.FirstOrDefault(_taxa => _taxa.Bandeira == _transacao.Bandeira.ToLower()); if (_transacao.Tipo.ToLower() == "credito") { return(CalculoTaxacredito(_transacao, taxa)); } if (_transacao.Tipo.ToLower() == "debito") { return(CalculoTaxadebito(_transacao, taxa)); } return(0); }
public IActionResult Get() { return(Ok(_mdrRepositorio.GetMDR())); }