コード例 #1
0
        public Pagamento Verificar(string id)
        {
            var pagamento      = _pagamentoRepository.GetById(id);
            var serviceGateway = ServiceGatewayFactory.ServiceGateway(pagamento.TipoPagamento);

            pagamento = serviceGateway.ConsultarRetornoPagamento(pagamento);
            return(pagamento);
        }
コード例 #2
0
        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);
        }