public async Task <ActionResult> SendCode()
        {
            var clientId      = this.GetClientId();
            var clientAccount = await _clientAccountsRepository.GetByIdAsync(clientId);

            await _srvSmsConfirmator.SendSmsAsync(clientId);

            return(this.JsonFailResult("#code", Phrases.VerificationSmsHasBeenSent + " " + clientAccount.Phone));
        }
Exemplo n.º 2
0
        public async Task <IClientAccount> RegisterClientAsync(string email, string firstname, string lastname, string phone, string password)
        {
            IClientAccount clientAccount = ClientAccount.Create(email, phone);

            clientAccount = await _tradersRepository.RegisterAsync(clientAccount, password);

            await _srvSmsConfirmator.SendSmsAsync(clientAccount.Id);

            await _personalDataRepository.SaveAsync(PersonalData.Create(clientAccount, firstname, lastname));

            await RegisterAccountAsync(clientAccount, "EUR");
            await RegisterAccountAsync(clientAccount, "USD");
            await RegisterAccountAsync(clientAccount, "CHF");

            return(clientAccount);
        }