<?xml version="1.0"?>
<!--
/**
 *                       ######
 *                       ######
 * ############    ####( ######  #####. ######  ############   ############
 * #############  #####( ######  #####. ######  #############  #############
 *        ######  #####( ######  #####. ######  #####  ######  #####  ######
 * ###### ######  #####( ######  #####. ######  #####  #####   #####  ######
 * ###### ######  #####( ######  #####. ######  #####          #####  ######
 * #############  #############  #############  #############  #####  ######
 *  ############   ############  #############   ############  #####  ######
 *                                      ######
 *                               #############
 *                               ############
 *
 * Adyen Payment module (https://www.adyen.com/)
 *
 * Copyright (c) 2015 Adyen BV (https://www.adyen.com/)
 * See LICENSE.txt for license details.
 *
 * Author: Adyen <magento@adyen.com>
 */
-->
<include xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_include.xsd">
    <group id="adyen_advanced_order_processing" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
        <label><![CDATA[Advanced: Magento Order Processing]]></label>
        <frontend_model>Magento\Config\Block\System\Config\Form\Fieldset</frontend_model>
        <field id="paypal_capture_mode" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Use manual capture for PayPal</label>
            <tooltip>Should be on 'No' by default. If you have requested with Adyen Support for your PayPal integration to be on manual capture, set this to 'Yes'.</tooltip>
            <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            <config_path>payment/adyen_abstract/paypal_capture_mode</config_path>
        </field>
        <field id="capture_on_shipment" translate="label" type="select" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Capture on shipment for OpenInvoice Methods (Klarna, Ratepay and Afterpay)</label>
            <tooltip>If you enable this function it will do a capture request to Adyen if you do a shipment for openinvoice payment methods.</tooltip>
            <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            <config_path>payment/adyen_abstract/capture_on_shipment</config_path>
        </field>
        <field id="auto_capture_openinvoice" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Use auto-capture for OpenInvoice payments</label>
            <tooltip>Applicable for Klarna and AfterPay only. By default OpenInvoice is set to manual capture. If you want auto capture you need to contact magento@adyen.com. After approval has been given, then you can set this option to 'Yes'.</tooltip>
            <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            <config_path>payment/adyen_abstract/auto_capture_openinvoice</config_path>
        </field>
        <field id="payment_authorized_virtual" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Order status: payment capture (virtual products)</label>
            <tooltip>(optional) Select only status assigned to state complete. Leave empty to use the same as normal products</tooltip>
            <source_model>Adyen\Payment\Model\Config\Source\Complete</source_model>
            <config_path>payment/adyen_abstract/payment_authorized_virtual</config_path>
        </field>
        <field id="pending_status" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Order status: pending Bank Transfer/SEPA orders</label>
            <tooltip>By default, Adyen does not inform your Magento store about pending payments. If you want these notifications to be received, Go to Adyen Customer Area => Server Communication and add BankTransfer Pending Notification and Direct-Debit Pending Notification.</tooltip>
            <source_model>Magento\Sales\Model\Config\Source\Order\Status\NewStatus</source_model>
            <config_path>payment/adyen_abstract/pending_status</config_path>
        </field>
        <field id="send_email_bank_sepa_on_pending" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Send order confirmation email for Bank Transfer/SEPA</label>
            <tooltip>Send a confirmation mail after Bank Tranfer/SEPA is placed (not yet paid). If you want these notifications to be received, Go to Adyen Customer Area => Server Communication and add BankTransfer Pending Notification and Direct-Debit Pending Notification.</tooltip>
            <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            <config_path>payment/adyen_abstract/send_email_bank_sepa_on_pending</config_path>
        </field>
        <field id="sepa_flow" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Sepa Payment flow</label>
            <tooltip>If you are not sure just leave it at 'Sale’. Sale means it is always immidiate capture with auth/cap it will follow the Capture Delay. If you want to enable 'Auth/Capt' for SEPA Direct Debit, please contact support@adyen.com</tooltip>
            <source_model>Adyen\Payment\Model\Config\Source\SepaFlow</source_model>
            <config_path>payment/adyen_abstract/sepa_flow</config_path>
        </field>
    </group>
</include>