public ActionResult About() { ViewBag.Message = "Your application description page."; SMSLogic logic = new SMSLogic(); logic.EnviarMensaje("+51999053682", "testarque"); return(View()); }
public async Task <ActionResult> AddPhoneNumber(AddPhoneNumberViewModel model) { if (!ModelState.IsValid) { return(View(model)); } // Generate the token and send it var code = await UserManager.GenerateChangePhoneNumberTokenAsync(User.Identity.GetUserId(), model.Number); if (UserManager.SmsService != null) { var message = new IdentityMessage { Destination = model.Number, Body = "Your security code is: " + code }; SMSLogic logic = new SMSLogic(); logic.EnviarMensaje(model.Number, message.Body); } return(RedirectToAction("VerifyPhoneNumber", new { PhoneNumber = model.Number })); }