sylius_shop_checkout_select_payment:
    path: /checkout/select-payment
    methods: [GET, PUT]
    defaults:
        _controller: sylius.controller.order::updateAction
        _sylius:
            event: payment
            flash: false
            template: "@SyliusShop/Checkout/selectPayment.html.twig"
            form: Sylius\PayPalPlugin\Form\Type\SelectPaymentType
            repository:
                method: findCartForSelectingPayment
                arguments:
                    - "expr:service('sylius.context.cart').getCart().getId()"
            state_machine:
                graph: sylius_order_checkout
                transition: select_payment

sylius_shop_order_show:
    path: /order/{tokenValue}
    methods: [GET, PUT]
    defaults:
        _controller: sylius.controller.order::updateAction
        _sylius:
            template: "@SyliusShop/Order/show.html.twig"
            repository:
                method: findOneBy
                arguments: [tokenValue: $tokenValue]
            form:
                type: Sylius\PayPalPlugin\Form\Type\SelectPaymentType
                options:
                    validation_groups: [sylius_order_pay]
            redirect:
                route: sylius_shop_order_pay
                parameters:
                    tokenValue: resource.tokenValue
            flash: false
