<?xml version="1.0"?>
<!--
/**
* Copyright © 2018 CollinsHarper. All rights reserved.
* See LICENSE.txt for license details.
*/
-->
<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" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1">
                <group id="cybersource_visa" translate="label" type="text" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="1">
                	<label>Visa Checkout</label>
                    <field id="active" translate="label" type="select" sortOrder="0" showInDefault="1" showInWebsite="0" showInStore="1">
                        <label>Enabled</label>
                        <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                        <config_path>payment/chcybersourcevisa/active</config_path>
                    </field>

                    <field id="title" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
                        <label>Title</label>
                        <config_path>payment/chcybersourcevisa/title</config_path>
                    </field>

                    <field id="order_status" translate="label" type="select" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
                        <label>New Order Status</label>
                        <source_model>Magento\Sales\Model\Config\Source\Order\Status\Processing</source_model>
                        <config_path>payment/chcybersourcevisa/order_status</config_path>
                    </field>

                    <field id="test" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                        <label>Test Mode?</label>
                        <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                        <config_path>payment/chcybersourcevisa/test</config_path>
                    </field>

                    <field id="api_key" translate="label" type="obscure" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
                        <label>API Key</label>
                        <backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
                        <config_path>payment/chcybersourcevisa/api_key</config_path>
                    </field>

                    <field id="payment_action" type="select" showInDefault="1" showInWebsite="1" sortOrder="110" translate="label">
                        <label>Payment Action</label>
                        <source_model>CyberSource\VisaCheckout\Model\Adminhtml\Source\PaymentAction</source_model>
                        <config_path>payment/chcybersourcevisa/payment_action</config_path>
                    </field>

                    <field id="sort_order" translate="label" type="text" sortOrder="150" showInDefault="1" showInWebsite="0" showInStore="1">
                        <label>Sort Order</label>
                        <config_path>payment/chcybersourcevisa/sort_order</config_path>
                    </field>

                </group>
            </group>
        </section>
    </system>
</config>
