public string consultarEstado(string nrOrden) { CustomerServicesReference.CustomerServicesClient objProxy = new CustomerServicesReference.CustomerServicesClient(); ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(ValidateServerCertificate); string respuesta = objProxy.consultarEstado(this.llaveidentificacion, Encryption.Encrypt(nrOrden, this.llaveencriptacion)); respuesta = Encryption.Decrypt(respuesta, this.llaveencriptacion); return(respuesta); }
public string realizarPago( string pv_orderId, //(String[20], Requerido) string pv_monto, //(Double, Requerido) - los decimales se manejan con "." usamos la "," como separador en la cadena string pv_linea, //(Integer[8], Requerido) byte metodoPago = 0, string pv_urlCorrecto = "https://www.google.com", //(String[100], Requerido) string pv_urlError = "https://www.youtube.com", //(String[200], Requerido) //Con Facturacion string pv_nit = "", //(String[20], Opcional valor por defecto = “”) string pv_razonSocial = "", //(String[40], Opcional, Valor por defecto=””) string pv_items = "", //(Opcional, Valor por defecto=””) string pv_notificacion = "", //(String[20], Opcional, Valor por defecto=””) string pv_confirmacion = "", //(String[20], Opcional, Valor por defecto = ””) string pv_nombre = "", //(String[100], Opcional, Valor por defecto = “”) string pv_mensaje = "", //(String[100], Opcional, Valor por defecto = “” ) string pv_nroDocumento = "" //(String[10], Opcional, Valor por defecto = ””) ) { CustomerServicesReference.CustomerServicesClient objProxy = new CustomerServicesReference.CustomerServicesClient(); ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(ValidateServerCertificate); //pv_nroDocumento = "SCIS"; //pv_linea = "SnlineaS"; //pv_monto = "SmontoS"; //pv_orderId = "SnorderidS"; //pv_nombre = "SnombreS"; //pv_confirmacion = "SncomercioS"; //pv_notificacion = "Codigo: ScodnotiS"; //pv_urlCorrecto = "SurlcorrectoS"; //pv_urlError="SurlerrorS"; //pv_items="SitemsfacturaS"; //pv_razonSocial = "SrazonsocialfacturaS"; //pv_nit = "SnitfacturaS"; // Sin Facturacion por Terceros this.mensaje = this.mensaje.Replace("SnorderidS", pv_orderId); this.mensaje = this.mensaje.Replace("SmontoS", pv_monto); this.mensaje = this.mensaje.Replace("SnlineaS", pv_linea); this.mensaje = this.mensaje.Replace("SurlcorrectoS", pv_urlCorrecto); this.mensaje = this.mensaje.Replace("SurlerrorS", pv_urlError); // Con Facturacion por Terceros this.mensaje = this.mensaje.Replace("SnitfacturaS", pv_nit); this.mensaje = this.mensaje.Replace("SrazonsocialfacturaS", pv_razonSocial); this.mensaje = this.mensaje.Replace("SitemsfacturaS", pv_items); this.mensaje = this.mensaje.Replace("ScodnotiS", pv_notificacion); this.mensaje = this.mensaje.Replace("SncomercioS", pv_confirmacion); this.mensaje = this.mensaje.Replace("SCIS", pv_nroDocumento); this.mensaje = this.mensaje.Replace("SnombreS", pv_nombre); this.mensaje = Encryption.Encrypt(this.mensaje, this.llaveencriptacion); string respuesta = ""; if (metodoPago == 0) { respuesta = objProxy.solicitarPago(this.llaveidentificacion, this.mensaje); } else { respuesta = objProxy.solicitarPagoAsincrono(this.llaveidentificacion, this.mensaje); } respuesta = Encryption.Decrypt(respuesta, this.llaveencriptacion); return(respuesta); }