onQueue(QueueName::JOB->value); } /** * Execute the job. * * @return void */ public function handle() { try { API::sendReceiptIssuingOrder($this->order, $this->custom, $this->tax, $this->eventName, $this->eventDatetime); } catch (Exception $e) { $this->log(false); throw $e; } $this->log(true); } public function log(bool $success) { $log = sprintf( "[HelloTechno]領収証発行依頼情報送信[%s] %s ID:%s C:%s P:%s A:%d", $this->eventName, $success ? "成功" : "失敗", $this->order->id, $this->custom->customer_name, $this->custom->parking_name, $this->custom->adjust_seq_no ?? 0, ); if ($success) { logs()->info($log); } else { logs()->error($log); } } }