<?xml version="1.0" ?>

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

	<services>
        <!-- Commands -->
        <service id="VRPaymentPayment\Core\Checkout\Subscription\Command\GenerateSubscriptionOrderCommand">
            <argument type="service" id="Symfony\Component\Messenger\MessageBusInterface"/>
            <argument type="service" id="subscription.repository" on-invalid="null" />
            <tag name="console.command"/>
        </service>

        <!-- Services -->
		<service id="VRPaymentPayment\Core\Checkout\PaymentHandler\VRPaymentPaymentHandler">
			<argument type="service" id="VRPaymentPayment\Core\Checkout\Cart\CustomCartPersister"/>
			<argument type="service" id="VRPaymentPayment\Core\Api\Transaction\Service\TransactionService"/>
			<argument type="service" id="Shopware\Core\Checkout\Order\Aggregate\OrderTransaction\OrderTransactionStateHandler"/>
			<argument type="service" id="Shopware\Core\System\SalesChannel\Context\SalesChannelContextService"/>
            <argument type="service" id="order_transaction.repository"/>
            <argument type="service" id="subscription.repository" on-invalid="null" />
			<call method="setLogger">
				<argument type="service" id="monolog.logger.vrpayment_payment"/>
			</call>
			<tag name="shopware.payment.method"/>
		</service>

		<service id="VRPaymentPayment\Core\Checkout\Cart\CustomCartPersister"
				 decorates="Shopware\Core\Checkout\Cart\CartPersister"
				 decoration-inner-name="VRPaymentPayment\Core\Checkout\Cart\CustomCartPersister.inner">
			<argument type="service" id="VRPaymentPayment\Core\Checkout\Cart\CustomCartPersister.inner"/>
		</service>
	</services>

</container>
