public ActionResult MarkAsPaid(PaymentModel model)
        {
            decimal difference;
            Boolean status = AccountManager.SetAccountAsActive(model, out difference);

            if (status)
            {
                return PartialView("_AdminSuccess");
            }

            // Kick back a failure message if the check input is valid, but the amount is not.
            return PartialView("_PaymentError", new PaymentErrorModel
                                                  {
                                                      CheckNumber = model.CheckNumber,
                                                      Difference = difference
                                                  });
        }
        public static Boolean SetAccountAsActive(PaymentModel model, out decimal difference)
        {
            MemberProfile memberProfile = MemberProfile.GetProfile(model.UserName);

            difference = 0;

            if (memberProfile.AmountDue > 0 && model.Amount == memberProfile.AmountDue)
            {
                new HealthManager().AddCheck(model.CheckNumber, model.Amount);

                // Deduct the amount paid from amount due.
                memberProfile.AmountDue -= model.Amount;
                memberProfile.Save();

                // Mark them as paid
                Roles.AddUserToRole(model.UserName, "Paid");

                return true;
            }

            // We only reach this point if we fail above
            difference = memberProfile.AmountDue - model.Amount;
            return false;
        }