<?xml version="1.0"?>
<!--
/**
 * Mageplaza
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Mageplaza.com license that is
 * available through the world-wide-web at this URL:
 * https://www.mageplaza.com/LICENSE.txt
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade this extension to newer
 * version in the future.
 *
 * @category    Mageplaza
 * @package     Mageplaza_Osc
 * @copyright   Copyright (c) Mageplaza (https://www.mageplaza.com/)
 * @license     https://www.mageplaza.com/LICENSE.txt
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="sales_model_service_quote_submit_before">
        <observer name="convertOscDataToOrder" instance="Mageplaza\Osc\Observer\QuoteSubmitBefore"/>
    </event>
    <event name="controller_action_predispatch_paypal_express_placeOrder">
        <observer name="osc_predispatch_paypal_express_placeOrder" instance="Mageplaza\Osc\Observer\PaypalExpressPlaceOrder"/>
    </event>
    <event name="sales_model_service_quote_submit_success">
        <observer name="convertOscDataToOrder" instance="Mageplaza\Osc\Observer\QuoteSubmitSuccess"/>
    </event>
    <event name="payment_cart_collect_items_and_amounts">
        <observer name="oscPaypalPrepareItems" instance="Mageplaza\Osc\Observer\PaypalPrepareItems"/>
    </event>
    <event name="checkout_submit_all_after">
        <observer name="osc_reindex_customer_grid" instance="Mageplaza\Osc\Observer\ReindexCustomer"/>
    </event>
    <event name="sales_quote_address_save_before">
        <observer name="osc_before_save_customer_address_attribute" instance="Mageplaza\Osc\Observer\QuoteAddressBeforeSave"/>
    </event>
</config>
