getMachineId example


#[Package('core')] class Migration1628519513AddUnconfirmedTransactionState extends MigrationStep
{
    public function getCreationTimestamp(): int
    {
        return 1628519513;
    }

    public function update(Connection $connection): void
    {
        $machineId = $this->getMachineId($connection, 'order_transaction.state');

        if (!$machineId) {
            return;
        }

        $stateId = Uuid::randomHex();

        try {
            $connection->executeStatement(
                'INSERT INTO state_machine_state (id, technical_name, state_machine_id, created_at) VALUES (:id, :technical_name, :state_machine_id, :created_at)',
                [
/** * @throws IllegalTransitionException * @throws StateMachineException */
    private function transitState(string $machine, string $orderId, string $toPlace, Context $context): void
    {
        if (!$toPlace) {
            return;
        }

        $data = new ParameterBag();
        $machineId = $machine === self::ORDER ? $orderId : $this->getMachineId($machine$orderId);
        if (!$machineId) {
            throw StateMachineException::stateMachineNotFound($machine);
        }

        $actionName = $this->getAvailableActionName($machine$machineId$toPlace);
        if (!$actionName) {
            $actionName = $toPlace;
        }

        switch ($machine) {
            case self::ORDER:
                

#[Package('core')] class Migration1591361320ChargebackAndAuthorized extends MigrationStep
{
    public function getCreationTimestamp(): int
    {
        return 1591361320;
    }

    public function update(Connection $connection): void
    {
        $machineId = $this->getMachineId($connection, 'order_transaction.state');

        if (!$machineId) {
            return;
        }

        $state = [
            'technical_name' => 'authorized',
            'translations' => [
                'en-GB' => 'Authorized',
                'de-DE' => 'Autorisiert',
            ],
            
Home | Imprint | This part of the site doesn't use cookies.