Exemplo n.º 1
0
 public HttpResponseMessage UpdateStatus(long receive_id, long user_id)
 {
     try
     {
         var allPayment = receiveRepository.UpdateStatus(receive_id, user_id);
         if (allPayment == true)
         {
             var formatter = RequestFormat.JsonFormaterString();
             return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                 output = "success", msg = "Payment Recieved Successfully"
             }, formatter));
         }
         else
         {
             var formatter = RequestFormat.JsonFormaterString();
             return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
                 output = "warning", msg = "Please Verify First"
             }, formatter));
         }
     }
     catch (Exception ex)
     {
         var formatter = RequestFormat.JsonFormaterString();
         return(Request.CreateResponse(HttpStatusCode.OK, new Confirmation {
             output = "error", msg = ex.ToString()
         }, formatter));
     }
 }