services:
    _defaults:
        public: false
        autowire: true
        autoconfigure: true

    #
    # CHECKOUT MANAGER
    #
    # Predefined core checkout manager implementations. Undefined arguments (order manager, commit order processor,
    # options, payment manager, ...) will be set from config.
    #

    Pimcore\Bundle\EcommerceFrameworkBundle\CheckoutManager\CheckoutManagerFactory:
        arguments:
            - '@pimcore_ecommerce.environment'
            - '@pimcore_ecommerce.locator.order_manager'
            - '@pimcore_ecommerce.locator.checkout_manager.commit_order_processor'
            - [] # checkout steps
            - '@?' # payment provider
            - [] # options
            - '@?'
            - '@event_dispatcher'

    Pimcore\Bundle\EcommerceFrameworkBundle\CheckoutManager\V7\CommitOrderProcessor:
        arguments:
            - '@Symfony\Component\Lock\LockFactory'
            - '@pimcore_ecommerce.locator.order_manager'
            - '@event_dispatcher'
            - '@Pimcore\Log\ApplicationLogger'
            - [] # options
        calls:
            - [setLogger, ['@logger']]
        tags:
            - { name: monolog.logger, channel: pimcore_ecommerce }

    Pimcore\Bundle\EcommerceFrameworkBundle\CheckoutManager\V7\HandlePendingPayments\ThrowExceptionStrategy:
    Pimcore\Bundle\EcommerceFrameworkBundle\CheckoutManager\V7\HandlePendingPayments\CancelPaymentOrRecreateOrderStrategy: ~
    Pimcore\Bundle\EcommerceFrameworkBundle\CheckoutManager\V7\HandlePendingPayments\AlwaysRecreateOrderStrategy: ~
