public HttpResponseMessage CheckPaymantQR(PaymentCheckPaymantQRRequest model) { PaymentCheckPaymantQRResponse response = new PaymentCheckPaymantQRResponse(); HttpResponseMessage responseMessage = new HttpResponseMessage(); if (!ModelState.IsValid) { response.IsSucces = false; response.Message = "There is not such action"; responseMessage.Content = new StringContent(JsonConvert.SerializeObject(response)); responseMessage.StatusCode = HttpStatusCode.BadRequest; return(responseMessage); } response = PaymentDB.CheckPaymant(model); responseMessage.Content = new StringContent(JsonConvert.SerializeObject(response)); responseMessage.StatusCode = HttpStatusCode.Accepted; return(responseMessage); }