<?xml version="1.0"?>
<!--
  ~ Copyright © 2020 CyberSource. All rights reserved.
  ~ See accompanying LICENSE.txt for applicable terms of use and license.
  -->

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <section id="payment">
            <group id="cybersource_section">
                <group id="cybersource_wechatpay" translate="label" type="text" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>WeChat Pay</label>
                    <field id="active" translate="label" type="select" sortOrder="0" showInDefault="1" showInWebsite="1" showInStore="1">
                        <label>Enabled</label>
                        <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                        <config_path>payment/cybersourcewechatpay/active</config_path>
                    </field>
                    <field id="title" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
                        <label>Title</label>
                        <config_path>payment/cybersourcewechatpay/title</config_path>
                    </field>
                    <field id="qr_expiration_time" translate="label" type="text" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0">
                        <label>QR Code Expiration Time</label>
                        <config_path>payment/cybersourcewechatpay/qr_expiration_time</config_path>
                        <comment>Seconds.</comment>
                    </field>
                    <field id="check_status_frequency" translate="label" type="text" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="0">
                        <label>Check Status Frequency</label>
                        <config_path>payment/cybersourcewechatpay/check_status_frequency</config_path>
                        <comment>Seconds.</comment>
                    </field>
                    <field id="max_status_requests" translate="label" type="text" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0">
                        <label>Max Status Requests</label>
                        <config_path>payment/cybersourcewechatpay/max_status_requests</config_path>
                        <comment>Set 0 to disable the limit.</comment>
                    </field>
                    <field id="allowspecific" translate="label" type="allowspecific" sortOrder="100" 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/cybersourcewechatpay/allowspecific</config_path>
                    </field>
                    <field id="specificcountry" translate="label" type="multiselect" sortOrder="150" showInDefault="1" showInWebsite="1" showInStore="0">
                        <label>Payment From Specific Countries</label>
                        <source_model>Magento\Directory\Model\Config\Source\Country</source_model>
                        <config_path>payment/cybersourcewechatpay/specificcountry</config_path>
                    </field>
                    <field id="popup_message_delay" translate="label" type="text" sortOrder="160" showInDefault="1" showInWebsite="1" showInStore="0">
                        <label>Success/Failure Message Delay</label>
                        <config_path>payment/cybersourcewechatpay/popup_message_delay</config_path>
                        <comment>Seconds.</comment>
                    </field>
                    <field id="test_response_code" translate="label" type="select" sortOrder="170" showInDefault="1" showInWebsite="1" showInStore="1">
                        <label>Check Status query Simulated Response</label>
                        <source_model>CyberSource\WeChatPay\Model\Config\Source\CheckStatusResponse</source_model>
                        <config_path>payment/cybersourcewechatpay/test_response_code</config_path>
                        <comment>For test mode only.</comment>
                    </field>
                    <field id="sort_order" translate="label" type="text" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1">
                        <label>Sort Order</label>
                        <config_path>payment/cybersourcewechatpay/sort_order</config_path>
                    </field>
                </group>
            </group>
        </section>
    </system>
</config>
