public IActionResult CheckPromocode(CheckPromocodeModel promocodeModel) { try { if (ModelState.IsValid) { var promocode = iPromoCode.GetPromoCodeByCode(promocodeModel.Code); if (promocode != null) { var cartDetails = iCart.GetUserCartDetail(promocodeModel.UserId, ""); var cartReturnModel = CartHelper.BindCheckPromocodeReturnModel(promocode, cartDetails); return(Ok(ResponseHelper.Success(cartReturnModel))); } else { return(Ok(ResponseHelper.Error(MessageConstants.PromocodeNotExists))); } } else { return(Ok(ResponseHelper.Error(MessageConstants.CompulsoryData))); } } catch (Exception ex) { LogHelper.ExceptionLog(ex.Message + " ::::: " + ex.StackTrace); return(Ok(ResponseHelper.Error(ex.Message))); } }