public Pagamento Verificar(string id) { var pagamento = _pagamentoRepository.GetById(id); var serviceGateway = ServiceGatewayFactory.ServiceGateway(pagamento.TipoPagamento); pagamento = serviceGateway.ConsultarRetornoPagamento(pagamento); return(pagamento); }
public Pagamento Inserir(Pagamento pagamento) { var serviceGateway = ServiceGatewayFactory.ServiceGateway(pagamento.TipoPagamento); pagamento.DataTransacao = DateTime.Now; pagamento = serviceGateway.EnviarPagamento(pagamento); pagamento = _pagamentoRepository.Insert(pagamento); return(pagamento); }