public virtual ActionResult ApplyPromoCode(string id, string promoCode) { var resp = _basketApi.ApplyPromoCode(Sanitizer.GetSafeHtmlFragment(id), Sanitizer.GetSafeHtmlFragment(promoCode)); if (resp.Result != null && resp.Result.IsVaild != false) { return(JsonSuccess(resp, JsonRequestBehavior.AllowGet)); } if (!string.IsNullOrEmpty(resp.Message)) { return(JsonError(resp.Message, JsonRequestBehavior.DenyGet)); } else { return(JsonError("false", JsonRequestBehavior.DenyGet)); } }