data = $data; } /** * Execute the job. */ public function handle(TransactionService $transactionService): void { try { $transactionService->recordDispense($this->data); } catch (\Exception $e) { Log::error("Failed to record dispense for machine {$this->data['serial_no']}: " . $e->getMessage()); throw $e; } } }