Пример #1
0
        public ActionResult AccountId(string code)
        {
            try
            {
                var token = CronofyHelper.GetAccountIdOAuthToken(code);
                ViewData["AccountId"] = token.AccountId;
                ViewData["AuthUrl"]   = CronofyHelper.GetAccountIdAuthUrl();
            }
            catch
            {
                return(new RedirectResult(CronofyHelper.GetAccountIdAuthUrl()));
            }

            return(View());
        }