<?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_hpp" translate="label" type="text" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1">
        <label><![CDATA[Hosted Payment Page (HPP) integration]]></label>
        <frontend_model>Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment</frontend_model>
        <fieldset_css>adyen-method-adyen-cc</fieldset_css>
        <comment>Process alternative payments methods</comment>
        <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Enabled</label>
            <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            <config_path>payment/adyen_hpp/active</config_path>
        </field>
        <field id="sort_order" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0">
            <label>Sort Order</label>
            <frontend_class>validate-number</frontend_class>
            <config_path>payment/adyen_hpp/sort_order</config_path>
        </field>
        <field id="skin_code" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Skin Code</label>
            <tooltip>Copy and paste the skin code of the skin you want to use from Test Customer Area => Skins.</tooltip>
            <config_path>payment/adyen_hpp/skin_code</config_path>
        </field>
        <field id="hmac_test" translate="label" type="obscure" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>HMAC Key for Test</label>
            <tooltip>Copy and paste the HMAC key of the skin you want to use from Test Customer Area => Skins. => click on [skin code] => Edit => HMAC for Test platform.</tooltip>
            <backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
            <config_path>payment/adyen_hpp/hmac_test</config_path>
        </field>
        <field id="hmac_live" translate="label" type="obscure" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>HMAC Key for Live</label>
            <tooltip>Copy and paste the HMAC key of the skin you want to use from Test Customer Area => Skins. => click on [skin code] => Edit => HMAC for Live platform.</tooltip>
            <backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
            <config_path>payment/adyen_hpp/hmac_live</config_path>
        </field>
        <group id="adyen_hpp_openinvoice_settings" translate="label" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="100">
            <label>Klarna\RatePay\Afterpay Settings</label>
            <frontend_model>Magento\Config\Block\System\Config\Form\Fieldset</frontend_model>
            <field id="show_gender" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Show Gender</label>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                <config_path>payment/adyen_hpp/show_gender</config_path>
            </field>
            <field id="show_dob" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Show Date of Birth</label>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                <config_path>payment/adyen_hpp/show_dob</config_path>
            </field>
            <field id="show_telephone" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Show Telephone</label>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                <config_path>payment/adyen_hpp/show_telephone</config_path>
            </field>
            <field id="ignore_second_address_field" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Ignore the second address line field</label>
                <tooltip>If you do not want to send the second line address field to Klarna set this setting to 'Yes'</tooltip>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                <config_path>payment/adyen_hpp/ignore_second_address_field</config_path>
            </field>
            <field id="ratepay_id" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>RatePAY Device Ident SId</label>
                <tooltip>Unique RatePAY Id provided by RatePAY integration consultant</tooltip>
                <config_path>payment/adyen_hpp/ratepay_id</config_path>
            </field>
        </group>
        <group id="adyen_hpp_advanced_settings" translate="label" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="200">
            <label>Advanced Settings</label>
            <frontend_model>Magento\Config\Block\System\Config\Form\Fieldset</frontend_model>
            <field id="title" translate="label" type="text" sortOrder="65" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Title</label>
                <config_path>payment/adyen_hpp/title</config_path>
            </field>
            <field id="delivery_days" translate="label" type="text" sortOrder="68" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Days to Delivery</label>
                <tooltip>How many days to be added to the current date for delivery. ONLY whole numbers allowed.</tooltip>
                <frontend_class>validate-number</frontend_class>
                <config_path>payment/adyen_hpp/delivery_days</config_path>
            </field>
            <field id="payment_selection_on_adyen" translate="label" type="select" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="0">
                <label>Payment method selection on Adyen Hosted Payment Page (HPP)</label>
                <tooltip>If you set this to 'Yes', payment methods in the checkout won't be displayed and you will be redirected to the Adyen HPP to make the selection.</tooltip>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                <config_path>payment/adyen_hpp/payment_selection_on_adyen</config_path>
            </field>
            <field id="payment_routine" translate="label" type="select" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Payment Flow Selection</label>
                <tooltip>Adyen provides you with 2 types of payment routines. The Single-Page flow is dynamic and contains card validation and animations powered by JavaScript. The Multi-Page flow is static, but performs better on older browsers.</tooltip>
                <source_model>Adyen\Payment\Model\Config\Source\PaymentRoutine</source_model>
                <depends><field id="payment_selection_on_adyen">1</field></depends>
                <config_path>payment/adyen_hpp/payment_routine</config_path>
            </field>
            <field id="shopper_locale" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Language locale (optional)</label>
                <tooltip>This will override the default shopper locale of the Magento store (e.g. nl_NL). Leave empty to let Magento decide.</tooltip>
                <config_path>payment/adyen_hpp/shopper_locale</config_path>
            </field>
            <field id="country_code" translate="label" type="text" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>ISO Country Code (optional)</label>
                <tooltip>This will override the shopper billing address country when determining what payment methods to display.</tooltip>
                <config_path>payment/adyen_hpp/country_code</config_path>
            </field>
        </group>
        <group id="adyen_hpp_country_specific" translate="label" showInDefault="1" showInWebsite="1" showInStore="0" sortOrder="210">
            <label>Country Specific Settings</label>
            <frontend_model>Magento\Config\Block\System\Config\Form\Fieldset</frontend_model>
            <field id="allowspecific" translate="label" type="allowspecific" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0">
                <label>Payment from Applicable Countries</label>
                <source_model>Magento\Payment\Model\Config\Source\Allspecificcountries</source_model>
                <config_path>payment/adyen_hpp/allowspecific</config_path>
            </field>
            <field id="specificcountry" translate="label" type="multiselect" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0">
                <label>Payment from Specific Countries</label>
                <source_model>Magento\Directory\Model\Config\Source\Country</source_model>
                <can_be_empty>1</can_be_empty>
                <config_path>payment/adyen_hpp/specificcountry</config_path>
            </field>
        </group>
    </group>
</include>