public void EmitirNFeComBuilder()
        {
            NFeBuilder builder = new NFeBuilder(GetConfig());

            builder.SetIdentificacao(new IdentificacaoNFe40(...));
            builder.SetDestinatario(new DestinatarioNFe40(...));
            builder.AddDetalhe(GetDetalhe());
            builder.SetTotal(new TotalNFe40(.....));
            builder.SetTransporte(new TransporteNFe40());
            builder.SetCobranca(GetCobranca());
            builder.AddPagamento(GetPagamento());
            builder.SetResponsavel(new ResponsavelTecNFe40(....));

            var        servNfe = new ServNFe4(GetConfig());
            IRetAutorz retorno = servNfe.Autorizar(builder.NFe);
        }
Example #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            var certificado = Certificado.ListareObterDoRepositorio();

            var config = new EmissorServicoConfig(VersaoServico.Ve400, Estado.Sp, TipoAmbiente.Homologacao, IndicadorSincronizacao.Assincrono);

            config.ConfiguraEmitente("12332134000199", "", "LEANDRO DOS SANTOS FERREIRA INFORMATICA ME", "VIP SOLUCOES",
                                     "715025640119", "", "", "", CRT.SimplesNacional, "AV RUI BARBOSA", "489", "", "CENTRO", 3556800, "VIRADOURO",
                                     "SP", "14740000", null);

            config.ConfiguraCertificadoA3("1234");
            config.Certificado.ManterDadosEmCache = true;
            config.Certificado.Serial             = certificado.SerialNumber;
            config.ConfiguraArquivoRetorno(false, "D:\\");

            var servicos = new ServNFe4(config);
            var retorno  = servicos.ConsultarStatus();

            var nfe = new NFeBuilder();


            servicos.Autorizar()
        }