Persist MyWash sessions on start command
This commit is contained in:
@@ -569,6 +569,30 @@ class moduleSelfServeRoute
|
||||
'subuser_id' => $subuser === false ? null : (int)$subuser->id,
|
||||
]);
|
||||
$lane->execute($command, $args);
|
||||
if ($command === selfserve_lane_command::START) {
|
||||
try {
|
||||
$license_plate = selfserve::standardize_registration(
|
||||
(string)($args->license_plate ?: $lane->getLicensePlate())
|
||||
);
|
||||
if ($license_plate !== '') {
|
||||
(new selfserve_wash_flow())->synchronizeSession(
|
||||
$lane_id,
|
||||
$license_plate,
|
||||
$customer_number > 0 ? $customer_number : null,
|
||||
false,
|
||||
null,
|
||||
false
|
||||
);
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
error_log(
|
||||
'Failed to persist self-serve START session for lane '
|
||||
. $lane_id
|
||||
. ': '
|
||||
. $e->getMessage()
|
||||
);
|
||||
}
|
||||
}
|
||||
$response->success([
|
||||
'id' => $lane->id,
|
||||
'status' => $lane->getLaneStatus()->name,
|
||||
|
||||
Reference in New Issue
Block a user