<?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">

    <imports>
        <import resource="components/common.xml"/>
        <import resource="components/express_checkout.xml"/>
        <import resource="components/legacy.xml"/>
        <import resource="components/paypal_order.xml"/>
        <import resource="components/plus.xml"/>
        <import resource="components/validation.xml"/>
        <import resource="components/order_builder.xml"/>
        <import resource="components/payment_source.xml"/>
        <import resource="components/payment_source_value.xml"/>
        <import resource="components/apm_risk_management.xml"/>
        <import resource="components/order_array_factory.xml"/>
    </imports>

    <services>

        <service id="paypal_unified.dependency_provider"
                 class="SwagPaymentPayPalUnified\Components\DependencyProvider"
                 public="true">
            <argument type="service" id="service_container"/>
        </service>

        <service id="paypal_unified.exception_handler_service"
                 class="SwagPaymentPayPalUnified\Components\Services\ExceptionHandlerService"
                 public="true">
            <argument id="paypal_unified.logger_service" type="service"/>
        </service>

        <service id="paypal_unified.logger_service"
                 class="SwagPaymentPayPalUnified\Components\Services\LoggerService"
                 public="true">
            <argument type="service" id="pluginlogger"/>
        </service>

        <service id="paypal_unified.order_data_service"
                 class="SwagPaymentPayPalUnified\Components\Services\OrderDataService"
                 public="true">
            <argument type="service" id="dbal_connection"/>
        </service>

        <service id="paypal_unified.payment_address_service"
                 class="SwagPaymentPayPalUnified\Components\Services\PaymentAddressService"
                 public="true"/>

        <service id="paypal_unified.payment_builder_service"
                 class="SwagPaymentPayPalUnified\Components\Services\PaymentBuilderService"
                 public="true">
            <argument type="service" id="paypal_unified.settings_service"/>
            <argument type="service" id="snippets"/>
            <argument type="service" id="paypal_unified.dependency_provider"/>
            <argument type="service" id="paypal_unified.common.price_formatter"/>
            <argument type="service" id="paypal_unified.common.customer_helper"/>
            <argument type="service" id="paypal_unified.common.cart_helper"/>
            <argument type="service" id="paypal_unified.common.return_url_helper"/>
        </service>

        <service id="paypal_unified.payment_status_service"
                 class="SwagPaymentPayPalUnified\Components\Services\PaymentStatusService"
                 public="true">
            <argument type="service" id="models"/>
            <argument type="service" id="paypal_unified.logger_service"/>
            <argument type="service" id="dbal_connection"/>
            <argument type="service" id="paypal_unified.settings_service"/>
        </service>

        <service id="paypal_unified.settings_service"
                 class="SwagPaymentPayPalUnified\Components\Services\SettingsService"
                 public="true">
            <argument type="service" id="models"/>
            <argument type="service" id="paypal_unified.dependency_provider"/>
        </service>

        <service id="paypal_unified.transaction_history_builder_service"
                 class="SwagPaymentPayPalUnified\Components\Services\TransactionHistoryBuilderService"
                 public="true">
        </service>

        <service id="paypal_unified.risk_management"
                 class="SwagPaymentPayPalUnified\Components\Services\RiskManagement\RiskManagement"
                 public="true">
            <argument type="service" id="paypal_unified.dependency_provider"/>
            <argument type="service" id="paypal_unified.payment_method_provider"/>
        </service>

        <service id="paypal_unified.risk_management_helper"
                 class="SwagPaymentPayPalUnified\Components\Services\RiskManagement\RiskManagementHelper"
                 public="true">
            <argument type="service" id="dbal_connection"/>
            <argument type="service" id="paypal_unified.dependency_provider"/>
            <argument type="service" id="shopware_attribute.crud_service"/>
        </service>

        <service id="SwagPaymentPayPalUnified\Components\Services\RiskManagement\EsdProductChecker"
                 class="SwagPaymentPayPalUnified\Components\Services\RiskManagement\EsdProductChecker"
                 public="true">
            <argument type="service" id="dbal_connection"/>
        </service>

        <service id="paypal_unified.payment_controller_helper"
                 class="SwagPaymentPayPalUnified\Components\Services\PaymentControllerHelper"
                 public="true">
            <argument type="service" id="paypal_unified.dependency_provider"/>
        </service>

        <service id="paypal_unified.payment_method_provider"
                 class="SwagPaymentPayPalUnified\Components\PaymentMethodProvider"
                 public="true">
            <argument type="service" id="dbal_connection"/>
            <argument type="service" id="models"/>
        </service>

        <service id="paypal_unified.paypal_order_parameter_facade"
                 class="SwagPaymentPayPalUnified\Components\PayPalOrderParameter\PayPalOrderParameterFacade"
                 public="true">
            <argument type="service" id="paypal_unified.payment_controller_helper"/>
            <argument type="service" id="paypal_unified.dependency_provider"/>
            <argument type="service" id="paypal_unified.common.cart_persister"/>
        </service>

        <service id="paypal_unified.onboarding_status_service"
                 class="SwagPaymentPayPalUnified\Components\Services\OnboardingStatusService"
                 public="true">
            <argument type="service" id="paypal_unified.merchant_integrations_resource"/>
            <argument type="service" id="paypal_unified.logger_service"/>
        </service>

        <service id="paypal_unified.button_locale_service"
                 class="SwagPaymentPayPalUnified\Components\ButtonLocaleService"
                 public="true">
            <argument type="service" id="paypal_unified.dependency_provider"/>
        </service>

        <service id="paypal_unified.dispatch_validation"
                 class="SwagPaymentPayPalUnified\Components\Services\DispatchValidation"
                 public="true">
            <argument type="service" id="config"/>
            <argument type="service" id="paypal_unified.dependency_provider"/>
        </service>

        <service id="paypal_unified.cart_restore_service"
                 class="SwagPaymentPayPalUnified\Components\Services\CartRestoreService"
                 public="true">
            <argument type="service" id="paypal_unified.dependency_provider"/>
            <argument type="service" id="models"/>
            <argument type="service" id="paypal_unified.logger_service"/>
        </service>

        <service id="paypal_unified.order_property_helper"
                 class="SwagPaymentPayPalUnified\Components\Services\OrderPropertyHelper"
                 public="true"/>
    </services>
</container>
