<?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="Magento\Framework\Controller\Result\Json">
        <plugin name="autogedal_paypo_approval_result"
                type="Autogedal\PayPo\Plugin\ApprovalResultPlugin"/>
    </type>

    <type name="Magento\Sales\Model\ResourceModel\Order\Handler\State">
        <plugin name="autogedal_paypo_approval_state"
                type="Autogedal\PayPo\Plugin\ApprovalStatePlugin"/>
    </type>

    <type name="PayPo\Payment\Controller\Checkout\Process">
        <plugin name="autogedal_paypo_approve_plugin"
                type="Autogedal\PayPo\Plugin\ApprovePlugin"/>
    </type>

    <type name="Magento\Sales\Model\Order">
        <plugin name="autogedal_paypo_order_status_history"
                type="Autogedal\PayPo\Plugin\OrderStatusHistoryPlugin"/>
    </type>

    <type name="Magento\Sales\Model\Order\Email\Sender\OrderSender">
        <plugin name="autogedal_paypo_suppress_email"
                type="Autogedal\PayPo\Plugin\SuppressNewOrderEmailPlugin"/>
    </type>

</config>
