add env vars
This commit is contained in:
parent
e8aaf57e10
commit
255d7a3957
@ -1,4 +1,5 @@
|
|||||||
using LeasingTrial;
|
using LeasingTrial;
|
||||||
|
using System;
|
||||||
using System.ServiceModel;
|
using System.ServiceModel;
|
||||||
|
|
||||||
namespace _1C.Gateway.Managers
|
namespace _1C.Gateway.Managers
|
||||||
@ -9,6 +10,12 @@ namespace _1C.Gateway.Managers
|
|||||||
|
|
||||||
public LeasingTrialManager()
|
public LeasingTrialManager()
|
||||||
{
|
{
|
||||||
|
var url = Environment.GetEnvironmentVariable("1C_URL_LEASING_TRIAL");
|
||||||
|
var username = Environment.GetEnvironmentVariable("1C_USERNAME");
|
||||||
|
var password = Environment.GetEnvironmentVariable("1C_PASSWORD");
|
||||||
|
|
||||||
|
|
||||||
|
var address = new EndpointAddress(url);
|
||||||
var binding = new BasicHttpBinding
|
var binding = new BasicHttpBinding
|
||||||
{
|
{
|
||||||
MaxReceivedMessageSize = int.MaxValue,
|
MaxReceivedMessageSize = int.MaxValue,
|
||||||
@ -18,12 +25,9 @@ namespace _1C.Gateway.Managers
|
|||||||
Transport = {ClientCredentialType = HttpClientCredentialType.Basic}
|
Transport = {ClientCredentialType = HttpClientCredentialType.Basic}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var address = new EndpointAddress("http://1c-dev.evoleasing.ru/1c_leasing_trial/ws/wsmd_exch.1cws");
|
|
||||||
|
|
||||||
_mdExchPortTypeClient = new md_exchPortTypeClient(binding, address);
|
_mdExchPortTypeClient = new md_exchPortTypeClient(binding, address);
|
||||||
_mdExchPortTypeClient.ClientCredentials.UserName.UserName = "ws";
|
_mdExchPortTypeClient.ClientCredentials.UserName.UserName = username;
|
||||||
_mdExchPortTypeClient.ClientCredentials.UserName.Password = "123";
|
_mdExchPortTypeClient.ClientCredentials.UserName.Password = password;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TransTaxResponse TransTax(TransTaxRequest transTaxRequest)
|
public TransTaxResponse TransTax(TransTaxRequest transTaxRequest)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user