public ResponseModel sendMessageToCustomer(int ChatID, string MobileNo, string ProgramCode, string Message, string WhatsAppMessage, string ImageURL, int InsertChat = 1) { ResponseModel objResponseModel = new ResponseModel(); int result = 0; int statusCode = 0; string statusMessage = ""; try { string token = Convert.ToString(Request.Headers["X-Authorized-Token"]); Authenticate authenticate = new Authenticate(); authenticate = SecurityService.GetAuthenticateDataFromToken(_radisCacheServerAddress, SecurityService.DecryptStringAES(token)); CustomerChatCaller customerChatCaller = new CustomerChatCaller(); result = customerChatCaller.SendMessageToCustomer(new CustomerChatService(_connectionString), ChatID, MobileNo, ProgramCode, Message, WhatsAppMessage, ImageURL, _ClientAPIUrl, authenticate.UserMasterID, InsertChat); statusCode = result > 0 ? (int)EnumMaster.StatusCode.Success : (int)EnumMaster.StatusCode.InternalServerError; statusMessage = CommonFunction.GetEnumDescription((EnumMaster.StatusCode)statusCode); objResponseModel.Status = true; objResponseModel.StatusCode = statusCode; objResponseModel.Message = statusMessage; objResponseModel.ResponseData = result; } catch (Exception) { throw; } return(objResponseModel); }