<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Experius\ExtraCheckoutAddressFields\Block\Checkout\LayoutProcessor">
        <plugin name="make_pin_location_as_mandatory" type="Codilar\Checkout\Plugin\Checkout\LayoutProcessor"/>
    </type>

    <type name="Magento\Customer\Controller\Account\Login">
        <plugin name="show_guest_checkout_message" type="Codilar\Checkout\Plugin\Customer\Login"/>
    </type>
    <type name="Magento\Customer\Controller\Account\CreatePost">
        <plugin name="redirect_register_customer_to_cart" type="Codilar\Checkout\Plugin\Customer\CreatePost"/>
    </type>
    <type name="Magento\Customer\Controller\Account\LoginPost">
        <plugin name="redirect_login_customer_to_cart" type="Codilar\Checkout\Plugin\Customer\LoginPost"/>
    </type>
    <type name="Codilar\Checkout\ViewModel\CheckoutViewModel">
        <arguments>
            <argument name="customerSession" xsi:type="object">Magento\Customer\Model\Session\Proxy</argument>
        </arguments>
    </type>
    <type name="VComm\PayBy\Controller\Payment\Notify">
        <plugin name="pay_by_webhook" type="Codilar\Checkout\Plugin\PayBy\Notify" />
    </type>

    <type name="VComm\PayBy\Controller\Payment\Response">
        <plugin name="restore_cart_on_payment_failure" type="Codilar\Checkout\Plugin\PayBy\Response"/>
    </type>
    
    <type name="Magento\SalesRule\Model\Quote\Discount">
        <plugin name="before_collect_restrictcoupon_usage"
                type="Codilar\Checkout\Plugin\Discount"/>
    </type>
</config>
