示例#1
0
        public ActionResult Complete(SubscriptionCompleteViewModel model)
        {
            if (!Core.Configuration.SubscriptionsEnabled)
            {
                ConfirmationNotification("Errordite subscriptions are not currently enabled, you may continue using the free trial until subscriptions become active.");
                return(RedirectToAction("index"));
            }

            var status = _completeSignUpCommand.Invoke(new CompleteSignUpRequest
            {
                CurrentUser    = Core.AppContext.CurrentUser,
                Reference      = model.Reference,
                SubscriptionId = model.SubscriptionId
            }).Status;

            if (status == CompleteSignUpStatus.Ok)
            {
                ConfirmationNotification("Your subscription has been created successfully, thank you.");
                return(RedirectToAction("index"));
            }

            return(RedirectToAction("failed", new { SubscritpionId = model.SubscriptionId }));
        }
示例#2
0
 public ActionResult ChargifyComplete(SubscriptionCompleteViewModel model)
 {
     return(Redirect(Url.Complete(model.SubscriptionId, model.Reference)));
 }
示例#3
0
 public ActionResult Failed(SubscriptionCompleteViewModel model)
 {
     return(View(model));
 }