public HttpResponseMessage CheckStatus(CheckPaymantStatusRequestModel model) { CheckPaymantStatusResponseModel responseModel = new CheckPaymantStatusResponseModel(); HttpResponseMessage responseMessage = new HttpResponseMessage(); if (!ModelState.IsValid) { responseModel.IsSuccess = false; responseModel.Message = "False request for payment"; responseMessage.StatusCode = HttpStatusCode.BadRequest; responseMessage.Content = new StringContent(JsonConvert.SerializeObject(responseModel)); return(responseMessage); } responseModel = PaymentDB.CheckStatus(model); responseMessage.Content = new StringContent(JsonConvert.SerializeObject(responseModel)); responseMessage.StatusCode = HttpStatusCode.Accepted; return(responseMessage); }