mundipagg/magento2

View on GitHub
etc/adminhtml/system/global.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0"?>

<include xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_include.xsd">
    <group id="mundipagg_mundipagg_global" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="10" translate="label">
        <label>Global Settings</label>
        <field id="module_version" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="10" translate="label" type="label">
            <label>Module Version</label>
            <comment/>
            <frontend_model>MundiPagg\MundiPagg\Block\Adminhtml\Form\Field\ModuleVersion</frontend_model>
        </field>
        <field id="active" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="20" translate="label" type="select">
            <label>Enable this Solution</label>
            <comment />
            <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            <config_path>mundipagg_mundipagg/global/active</config_path>
        </field>
        <field id="test_mode" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="20" translate="label" type="select">
            <label>Sandbox Mode Active</label>
            <comment><![CDATA[<p><strong style='color:red'>Warning!</strong> Don't forget to add your store's domain on Mundipagg dashboard</p>]]></comment>
            <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            <config_path>mundipagg_mundipagg/global/test_mode</config_path>
        </field>
        <field id="secret_key" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="30" translate="label" type="text">
            <label>Secret Key</label>
            <backend_model>MundiPagg\MundiPagg\Model\Validation\GenericValidation</backend_model>
            <comment>Secret key for First Authentication MundiPagg.Contact MundiPagg to get your own Secret Key.</comment>
            <config_path>mundipagg_mundipagg/global/secret_key</config_path>
            <depends>
                <field id="test_mode">0</field>
            </depends>
        </field>
        <field id="public_key" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="40" translate="label" type="text">
            <label>Public key</label>
            <backend_model>MundiPagg\MundiPagg\Model\Validation\GenericValidation</backend_model>
            <comment>Public key for Double Authentication MundiPagg. Contact MundiPagg to get your own Public key.</comment>
            <config_path>mundipagg_mundipagg/global/public_key</config_path>
            <depends>
                <field id="test_mode">0</field>
            </depends>
        </field>

        <field id="secret_key_test" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="30" translate="label" type="text">
            <label>Secret Key Test</label>
            <backend_model>MundiPagg\MundiPagg\Model\Validation\GenericValidation</backend_model>
            <comment>Secret key Test for First Authentication MundiPagg.Contact MundiPagg to get your own Secret Key Test.</comment>
            <config_path>mundipagg_mundipagg/global/secret_key_test</config_path>
            <depends>
                <field id="test_mode">1</field>
            </depends>
        </field>
        <field id="public_key_test" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="40" translate="label" type="text">
            <label>Public key Test</label>
            <backend_model>MundiPagg\MundiPagg\Model\Validation\GenericValidation</backend_model>
            <comment>Public key Test for Double Authentication MundiPagg. Contact MundiPagg to get your own Public key Test.</comment>
            <config_path>mundipagg_mundipagg/global/public_key_test</config_path>
            <depends>
                <field id="test_mode">1</field>
            </depends>
        </field>

        <field id="create_order" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="50" translate="label" type="select">
            <label>Always creates order</label>
            <comment><![CDATA[Create Magento's order even with failed payments]]></comment>
            <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            <config_path>mundipagg_mundipagg/global/create_order</config_path>
        </field>

        <field id="active_send_email" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="50" translate="label" type="select">
            <label>Send order status changes by e-mail</label>
            <comment><![CDATA[Send an e-mail every time when an order status is changed by a Mundipagg's webhook. <p><strong style='color:red'>Warning!</strong> Make sure you have set up your mail server correctly before enable it, otherwise you will run the risk of slowdowns and crashes of your platform.</p>]]></comment>
            <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            <config_path>mundipagg_mundipagg/global/sendmail</config_path>
        </field>
    </group>
</include>