'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);
$this->
insertTransition('fail',
$machineId,
$stateId,
$this->
getStateId($connection,
$machineId, 'failed'
),
$connection);
$this->
insertTransition('cancel',
$machineId,
$stateId,
$this->
getStateId($connection,
$machineId, 'cancelled'
),
$connection);
$this->
insertTransition('authorize',
$machineId,
$stateId,
$this->
getStateId($connection,
$machineId, 'authorized'
),
$connection);