'id' => Uuid::
fromHexToBytes($stateId),
'technical_name' => 'unconfirmed',
'state_machine_id' => Uuid::
fromHexToBytes($machineId),
'created_at'
=> (new \
DateTime())->
format(Defaults::STORAGE_DATE_TIME_FORMAT
),
] );
} catch (UniqueConstraintViolationException
) { // don't add state if it already exists
return;
} $this->
insertTranslations($stateId,
$connection);
// from
$this->
insertTransition('process_unconfirmed',
$machineId,
$this->
getStateId($connection,
$machineId, 'open'
),
$stateId,
$connection);
$this->
insertTransition('process_unconfirmed',
$machineId,
$this->
getStateId($connection,
$machineId, 'reminded'
),
$stateId,
$connection);
$this->
insertTransition('process_unconfirmed',
$machineId,
$this->
getStateId($connection,
$machineId, 'failed'
),
$stateId,
$connection);
$this->
insertTransition('process_unconfirmed',
$machineId,
$this->
getStateId($connection,
$machineId, 'cancelled'
),
$stateId,
$connection);
$this->
insertTransition('process_unconfirmed',
$machineId,
$this->
getStateId($connection,
$machineId, 'paid_partially'
),
$stateId,
$connection);
// to
$this->
insertTransition('paid',
$machineId,
$stateId,
$this->
getStateId($connection,
$machineId, 'paid'
),
$connection);
$this->
insertTransition('paid_partially',
$machineId,
$stateId,
$this->
getStateId($connection,
$machineId, 'paid_partially'
),
$connection);