if (!
$machineId) { return;
} $state =
[ 'technical_name' => 'authorized',
'translations' =>
[ 'en-GB' => 'Authorized',
'de-DE' => 'Autorisiert',
],
'transition' => 'authorize',
'from' =>
$this->
getStateIds($connection,
$machineId,
['open', 'in_progress', 'reminded'
]),
'to' =>
[ 'paid' =>
$this->
getStateId($connection,
$machineId, 'paid'
),
'paid_partially' =>
$this->
getStateId($connection,
$machineId, 'paid_partially'
),
'fail' =>
$this->
getStateId($connection,
$machineId, 'failed'
),
'cancel' =>
$this->
getStateId($connection,
$machineId, 'cancelled'
),
],
];
$this->
insertState($connection,
$state,
$machineId);
$state =
[