public bool EfetuarPagamentoPedido(DetalhePagamento detalhePagamento, decimal valorTotalPedido) { try { switch (detalhePagamento.FormaPagamento) { case FormaPagamento.CartaoDebito: case FormaPagamento.CartaoCredito: _gatewayPagamentoService.AtribuiInformacoesPagamento("login", "senha", detalhePagamento.NomeImpressoCartao, valorTotalPedido, detalhePagamento.MesExpiracao, detalhePagamento.AnoExpiracao, ObtemFormaPagamentoCartao(detalhePagamento.FormaPagamento)); _gatewayPagamentoService.EfetuarPagamento(); return(true); case FormaPagamento.Dinheiro: return(true); default: return(false); } } catch (Exception) { throw; } }