public static void Init() { TestBtcAddr.Init(); log = new Log(); test = new Test(); settings = new Settings(); credentials = new Credentials(settings); db = new DB(); ticketClient = new TicketClient(settings); btc = new BTC( settings.data.btc_host, settings.data.btc_rpcuser, settings.data.btc_rpcpassword ); cert = new Cert(); btcAddrStorage = new BTCAddrStorage() { CNT = settings.data.storage_btc_addr_cnt }; btcAddrStorage.Init( settings .data .storage_btc_addr_types .Replace(" ", "") .Split(',') ); emailParser = new EmailParser() { mailer = new Mailer() }; emailParser.LoadLastEmails(App.settings.data.parse_last_emails); }
public ZammadService() { string zammadUrl = System.Environment.GetEnvironmentVariable(ZammadUrlSetting); var account = ZammadAccount.CreateBasicAccount(zammadUrl, KeyVault.Login, KeyVault.Password); TicketClient = account.CreateTicketClient(); }
public async Task <IActionResult> Ticket() { var client = new TicketClient(_appSettings); var tickets = await client.GetTickets(); SetCookie("ticketId", tickets.Id, 30); return(RedirectToAction("Processing", new { ticketId = tickets.Id })); }
private void InitClient() { _client = new TicketClient(Encoding.UTF8); _client.LoadCitiesCompleted += new EventHandler <CityEventArgs>(_client_LoadCitiesCompleted); _client.RefreshVerifyCompleted += new EventHandler <VerifyEventArgs>(_client_RefreshVerifyCompleted); _client.LoginCompleted += new EventHandler <LoginEventArgs>(_client_LoginCompleted); _client.LoadPassengerCompleted += new EventHandler <PassengerEventArgs>(_client_LoadPassengerCompleted); _client.OpertionPassengerCompleted += new EventHandler <PassengerEventArgs>(_client_OpertionPassengerCompleted); _client.ReservationCompleted += new EventHandler <ReponseEventArgs <ReservationResult> >(_client_ReservationCompleted); _client.RequestOrderCompleted += new EventHandler <RequestOrderEventArgs>(_client_RequestOrderCompleted); _client.SubmitOrderCompleted += new EventHandler <ReponseEventArgs <RequestOrderResult> >(_client_SubmitOrderCompleted); _client.CreateOrderCompleted += new EventHandler <ReponseEventArgs <WaitQueueResult> >(_client_CreateOrderCompleted); _client.LoadCities(); }
public static void TestInit() { TEST_MODE = true; log = new Log(); DB.RemoveDB(); settings = new Settings(); ticketClient = new TicketClient(settings); db = new DB(); /** * ticket - якобы созданный тикет от нетекса. * btc_income - якобы входящее бабло от btc клиента. * btc_address - якобы только что сгенерированный адрес от btc клиента. * fake_send_btc - будет всегда якобы отправлять бабло на этот btc адрес. */ test = new Test() { data = new TestData() { ticket = new Components.TicketClient.Responses.TicketClientCreateResponse() { account = "+79060671232", comment = "#3877525#", btc_amount = 0.8756 }, btc_income = 0.8756, btc_address = "3J6jjLs8DBpqPZvNoohDzzsRUqzgWyeMfG", fake_send_btc = "3J6jjLs8DBpqPZvNoohDzzsRUqzgWyeMfG" } }; btc = new BTC("", "", ""); btcAddrStorage = new BTCAddrStorage() { CNT = settings.data.storage_btc_addr_cnt }; btcAddrStorage.Init( settings .data .storage_btc_addr_types .Replace(" ", "") .Split(',') ); btcAddrStorage.UpdateAddressList(); }
public WXMPClient( string appId, TicketClient ticketClient, BasisServiceClient basisServiceClient, CustomServiceClient customServiceClient, TemplateServiceClient templateServiceClient, MenuClient menuClient, UserManagerClient userManagerClient, AccountManagerClient accountManagerClient, MaterialClient materialClient, AccessTokenManager tokenManager) { AppId = appId; TicketClient = ticketClient; BasisServiceClient = basisServiceClient; CustomServiceClient = customServiceClient; TemplateServiceClient = templateServiceClient; MenuClient = menuClient; UserManagerClient = userManagerClient; AccountManagerClient = accountManagerClient; MaterialClient = materialClient; TokenManager = tokenManager; }