public GetFacturaModel GetFactura(string referenciaFactura) { ReferenciaFactura refe = new ReferenciaFactura { referenciaFactura = referenciaFactura }; PagosInerfaceClient cliente2 = new PagosInerfaceClient(); var response = cliente2.CosultarAsync(refe).Result; GetFacturaModel factura = new GetFacturaModel { referenciaId = response.ResultadoConsulta.referenciaFactura.referenciaFactura, TotalAPagar = response.ResultadoConsulta.totalPagar }; return(factura); }
public PagosModel pagoCompensar(string referenciaFactura, double valorFactura) { ReferenciaFactura refe = new ReferenciaFactura { referenciaFactura = referenciaFactura }; Pago pagoRealizado = new Pago { referenciaFactura = refe, totalPagar = valorFactura }; PagosInerfaceClient cliente = new PagosInerfaceClient(); var response = cliente.CompensarAsync(pagoRealizado).Result; PagosModel responseSoap = new PagosModel { referenciaId = response.Resultado.referenciaFactura.referenciaFactura, messageResponse = response.Resultado.mensaje }; return(responseSoap); }
public PagosFactura PagarFactura(string referenciaFactura, double valorFactura) { ReferenciaFactura refe = new ReferenciaFactura { referenciaFactura = referenciaFactura }; Pago pagoRealizado = new Pago { referenciaFactura = refe, totalPagar = valorFactura }; PagosInerfaceClient cliente3 = new PagosInerfaceClient(); var response = cliente3.PagarAsync(pagoRealizado).Result; PagosFactura responseFactura = new PagosFactura { referenciaFacturaId = response.Resultado.referenciaFactura.referenciaFactura, messageResponseFact = response.Resultado.mensaje }; return(responseFactura); }
private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress() { return(PagosInerfaceClient.GetEndpointAddress(EndpointConfiguration.Pagos)); }
private static System.ServiceModel.Channels.Binding GetDefaultBinding() { return(PagosInerfaceClient.GetBindingForEndpoint(EndpointConfiguration.Pagos)); }
public PagosInerfaceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : base(PagosInerfaceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
public PagosInerfaceClient(EndpointConfiguration endpointConfiguration) : base(PagosInerfaceClient.GetBindingForEndpoint(endpointConfiguration), PagosInerfaceClient.GetEndpointAddress(endpointConfiguration)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
public PagosInerfaceClient() : base(PagosInerfaceClient.GetDefaultBinding(), PagosInerfaceClient.GetDefaultEndpointAddress()) { this.Endpoint.Name = EndpointConfiguration.Pagos.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
public PagosInerfaceClient GetClientAsync() { var client = new PagosInerfaceClient(basicHttpBinding, endpointAddress); return(client); }