예제 #1
0
        public ActionResult DeletePlans(string Plan_ID)
        {
            objResponse Response = new objResponse();

            try
            {
                Response = objSubscriptionManager.DeletePlan(Convert.ToInt64(Plan_ID));

                if (Response.ErrorCode == 0)
                {
                    var planService = new StripePlanService();
                    planService.Delete(Plan_ID);

                    PlanModel objPlanModel = new PlanModel();
                    objPlanModel.plans = objSubscriptionManager.GetPlans();
                    return(View("AjaxAddPlan", objPlanModel));
                }
                else
                {
                    return(Json("", JsonRequestBehavior.AllowGet));
                }
            }
            catch (Exception ex)
            {
                BAL.Common.LogManager.LogError("DeletePlan Post method", 1, Convert.ToString(ex.Source), Convert.ToString(ex.StackTrace), Convert.ToString(ex.Message));
                return(Json("", JsonRequestBehavior.AllowGet));
            }
        }