Fix: Updates to OrderFullfilmentServices and box now clients, order views and checkout services

This commit is contained in:
arvanitakis committed 2026-09-18 00:54:43 +03:00
1 parent dcdc998eee
commit 12aaa43f10
15 files changed
+450 -18

No files matched your search

+12 -1
View File
@@ -14,12 +14,19 @@ use Modules\Core\Shipping\Enums\TrackingStatus;
use Modules\Core\Shipping\Events\ShipmentStatusUpdatedByCarrier;
use Modules\Core\Shipping\Models\Shipment;
use Modules\Core\Shipping\Models\ShipmentInfo;
use Throwable;
/**
* Carrier-agnostic: polls every Shipment not yet in a terminal state,
* skipping carriers whose fulfillment service doesn't implement
* SupportsTracking. New checkpoints are recorded in shipment_info and
* dispatch ShipmentStatusUpdatedByCarrier — one event per new checkpoint.
*
* Each shipment's trackShipment() call is individually try/caught in
* pollCarrierShipments() — one shipment's tracking lookup failing (a
* carrier 500, a malformed parcel response) must not stop the rest of that
* carrier's shipments in the same batch from being polled. The failure is
* reported and the loop continues.
*/
class PollShipmentTrackingJob implements ShouldQueue
{
@@ -68,7 +75,11 @@ class PollShipmentTrackingJob implements ShouldQueue
}
foreach ($shipments as $shipment) {
$this->recordNewCheckpoints($shipment, $service->trackShipment($shipment));
try {
$this->recordNewCheckpoints($shipment, $service->trackShipment($shipment));
} catch (Throwable $e) {
report($e);
}
}
}