public JsonResult _PostShipStation(string orderId) { var shipstationService = new ShipStationService(); var result = 0; if (!shipstationService.IsOrderExistingInShipStation(orderId) && !shipstationService.IsTrackingExistOrderNumber(orderId)) { var resultTask = shipstationService.PostOrderToShipStationByOrderNumber(orderId); resultTask.Wait(); result = resultTask.Result; } return(Json(new { result = result })); }