public string ProcesarRespuestaAceptacionRechazo(string RfcReceptor, string fecha, string rfcPac, List <SolicitudAceptacionRechazoFolios> F, SAT.CFDI.Cliente.Procesamiento.ServicioAceptacionRechazo.SignatureType asig) { string result; try { AceptacionRechazoServiceClient CFDI = new AceptacionRechazoServiceClient(); AcuseAceptacionRechazo A = new AcuseAceptacionRechazo(); HttpRequestMessageProperty tokenAutenticacion = this.AutenticaServicio(); using (new OperationContextScope(CFDI.InnerChannel)) { OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = tokenAutenticacion; A = CFDI.ProcesarRespuesta(new SolicitudAceptacionRechazo { Fecha = Convert.ToDateTime(fecha), RfcPacEnviaSolicitud = rfcPac, RfcReceptor = RfcReceptor, Signature = asig, Folios = F.ToArray() }); result = AccesoServicios.GetXMLFromObject(A); } } catch (Exception exception) { AccesoServicios.Log.Error("(Envio) Error al enviar los CFDI's " + exception.ToString()); result = null; } return(result); }
public string ConsultaCFDIRelacionadosRequest(string RfcPacEnviaSolicitud, string RfcReceptor, string RfcEmisor, string Uuid, SAT.CFDI.Cliente.Procesamiento.ServicioRelacionados.SignatureType asig) { string result; try { PeticionConsultaRelacionados D = new PeticionConsultaRelacionados(); CfdiConsultaRelacionadosServiceClient CFDI = new CfdiConsultaRelacionadosServiceClient(); D.RfcPacEnviaSolicitud = RfcPacEnviaSolicitud; if (!string.IsNullOrEmpty(RfcReceptor)) { D.RfcReceptor = RfcReceptor; } D.Signature = asig; D.Uuid = Uuid; if (!string.IsNullOrEmpty(RfcEmisor)) { D.RfcEmisor = RfcEmisor; } HttpRequestMessageProperty tokenAutenticacion = this.AutenticaServicio(); using (new OperationContextScope(CFDI.InnerChannel)) { OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = tokenAutenticacion; ConsultaRelacionados x = CFDI.ProcesarRespuesta(D); string xml = AccesoServicios.GetXMLFromObject(x); result = xml; } } catch (Exception exception) { AccesoServicios.Log.Error("(ConsultaRelacionados) Error al consultar los CFDI's " + exception.ToString()); result = null; } return(result); }
public string ConsultaAceptacionRechazo(string RfcReceptor) { string result; try { AceptacionRechazoServiceClient CFDI = new AceptacionRechazoServiceClient(); HttpRequestMessageProperty tokenAutenticacion = this.AutenticaServicio(); using (new OperationContextScope(CFDI.InnerChannel)) { OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = tokenAutenticacion; AcusePeticionesPendientes x = CFDI.ObtenerPeticionesPendientes(RfcReceptor); string xml = AccesoServicios.GetXMLFromObject(x); result = xml; } } catch (Exception exception) { AccesoServicios.Log.Error("(Consultar) Error al consultar los CFDI's " + exception.ToString()); result = null; } return(result); }