<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <services>
        <defaults public="true" />

        <!-- Generic -->
        <service id="sylius.payum_action.authorize_payment" class="Sylius\Bundle\PayumBundle\Action\AuthorizePaymentAction">
            <argument type="service" id="sylius.payment_description_provider" />
            <tag name="payum.action" all="true" alias="sylius.authorize_payment" />
        </service>
        <service id="sylius.payum_action.capture_payment" class="Sylius\Bundle\PayumBundle\Action\CapturePaymentAction">
            <argument type="service" id="sylius.payment_description_provider" />
            <tag name="payum.action" all="true" alias="sylius.capture_payment" />
        </service>
        <service id="sylius.payum_action.execute_same_request_with_payment_details" class="Sylius\Bundle\PayumBundle\Action\ExecuteSameRequestWithPaymentDetailsAction">
            <tag name="payum.action" all="true" />
        </service>
        <service id="sylius.payum_action.resolve_next_route" class="Sylius\Bundle\PayumBundle\Action\ResolveNextRouteAction">
            <tag name="payum.action" all="true" alias="sylius.resolve_next_route" />
        </service>

        <!-- PayPal -->
        <service id="sylius.payum_action.paypal_express_checkout.convert_payment" class="Sylius\Bundle\PayumBundle\Action\Paypal\ExpressCheckout\ConvertPaymentAction">
            <argument type="service" id="sylius.invoice_number_generator" />
            <tag name="payum.action" factory="paypal_express_checkout" alias="sylius.paypal_express_checkout.convert_payment" />
        </service>

        <!-- Offline -->
        <service id="sylius.payum_action.offline.convert_payment" class="Sylius\Bundle\PayumBundle\Action\Offline\ConvertPaymentAction">
            <tag name="payum.action" factory="offline" alias="sylius.offline.convert_payment" />
        </service>
        <service id="sylius.payum_action.offline.status" class="Sylius\Bundle\PayumBundle\Action\Offline\StatusAction">
            <tag name="payum.action" factory="offline" alias="sylius.offline.status"/>
        </service>
        <service id="sylus.payum_action.offline.status" alias="sylius.payum_action.offline.status">
            <deprecated package="sylius/payum-bundle" version="2.0">"%alias_id%" service is deprecated since Sylius 1.8 and will be removed in 2.0. Use "sylius.payum_action.offline.status" instead.</deprecated>
        </service>
        <service id="sylius.payum_action.offline.resolve_next_route" class="Sylius\Bundle\PayumBundle\Action\Offline\ResolveNextRouteAction">
            <tag name="payum.action" factory="offline" alias="sylius.offline.resolve_next_route" />
        </service>
    </services>
</container>
