コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
ファイル: Reference.cs プロジェクト: 3sneider/ModeladoTaller3
 private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
 {
     return(PagosInerfaceClient.GetEndpointAddress(EndpointConfiguration.Pagos));
 }
コード例 #5
0
ファイル: Reference.cs プロジェクト: 3sneider/ModeladoTaller3
 private static System.ServiceModel.Channels.Binding GetDefaultBinding()
 {
     return(PagosInerfaceClient.GetBindingForEndpoint(EndpointConfiguration.Pagos));
 }
コード例 #6
0
ファイル: Reference.cs プロジェクト: 3sneider/ModeladoTaller3
 public PagosInerfaceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
     base(PagosInerfaceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
コード例 #7
0
ファイル: Reference.cs プロジェクト: 3sneider/ModeladoTaller3
 public PagosInerfaceClient(EndpointConfiguration endpointConfiguration) :
     base(PagosInerfaceClient.GetBindingForEndpoint(endpointConfiguration), PagosInerfaceClient.GetEndpointAddress(endpointConfiguration))
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
コード例 #8
0
ファイル: Reference.cs プロジェクト: 3sneider/ModeladoTaller3
 public PagosInerfaceClient() :
     base(PagosInerfaceClient.GetDefaultBinding(), PagosInerfaceClient.GetDefaultEndpointAddress())
 {
     this.Endpoint.Name = EndpointConfiguration.Pagos.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
コード例 #9
0
        public PagosInerfaceClient GetClientAsync()
        {
            var client = new PagosInerfaceClient(basicHttpBinding, endpointAddress);

            return(client);
        }