예제 #1
0
        public async Task <AfipServiceReference.FECompUltimoAutorizadoResponse> FECompUltimoAutorizadoAsync(int ptoVta, int cbteTipo)
        {
            var wsfeService = new AfipServiceReference.ServiceSoapClient(AfipServiceReference.ServiceSoapClient.EndpointConfiguration.ServiceSoap);

            wsfeService.Endpoint.Address = new EndpointAddress(IsProdEnvironment ? WsfeUrlProd : WsfeUrlHomologation);

            var auth = new AfipServiceReference.FEAuthRequest {
                Cuit = Cuit, Sign = Sign, Token = Token
            };
            var response = await wsfeService.FECompUltimoAutorizadoAsync(auth, ptoVta, cbteTipo);

            return(response);
        }
예제 #2
0
        public async Task <AfipServiceReference.FECAESolicitarResponse> FECAESolicitarAsync(AfipServiceReference.FECAERequest feCaeReq)
        {
            var wsfeService = new AfipServiceReference.ServiceSoapClient(AfipServiceReference.ServiceSoapClient.EndpointConfiguration.ServiceSoap);

            wsfeService.Endpoint.Address = new EndpointAddress(IsProdEnvironment ? WsfeUrlProd : WsfeUrlHomologation);

            var auth = new AfipServiceReference.FEAuthRequest {
                Cuit = Cuit, Sign = Sign, Token = Token
            };

            var response = await wsfeService.FECAESolicitarAsync(auth, feCaeReq);

            return(response);
        }