public async Task <int> PostOrderToShippingStationByOrderNumber(string orderNumber) { if (_marketplaceMode == MarketplaceMode.TEST.ToString()) { return(0); } return(await _shipStationService.PostOrderToShipStationByOrderNumber(orderNumber)); }
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 })); }