Commit cf59b4af authored by Ángel Campos's avatar Ángel Campos Committed by GitHub

[PW-1686]: Update configuration UI Payment methods > Credit cards (#620)

* Fix for extending Yesno class in YesNoBillingAgreements

* [PW-1686]: Update configuration UI Payment methods > Credit cards

* New config groups: Credit card, Store payment details options
* Removed Country Specific config group
* Renamed Advanced Settings config group to Advanced options
* Credit cards ordered A-Z
* Renamed Vault Enabled to Store recurring contracts
* Moved store_oneclick enable dropdown to Credit Card > Store payment details options
parent 764b88a6
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
namespace Adyen\Payment\Model\Config\Source; namespace Adyen\Payment\Model\Config\Source;
class YesNoBillingAgreements extends \Magento\Config\Model\Config\Source\YesNo class YesNoBillingAgreements extends \Magento\Config\Model\Config\Source\Yesno
{ {
/** /**
......
...@@ -27,58 +27,38 @@ ...@@ -27,58 +27,38 @@
<group id="adyen_cc" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" <group id="adyen_cc" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1"
showInStore="1"> showInStore="1">
<label><![CDATA[CreditCard API integration]]></label> <label><![CDATA[CreditCard API integration]]></label>
<frontend_model>Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group</frontend_model> <frontend_model>Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Payment</frontend_model>
<fieldset_css>adyen-method-adyen-cc</fieldset_css> <fieldset_css>adyen-method-adyen-cc</fieldset_css>
<comment>Process creditcard payments inside your checkout.</comment> <comment>Adyen settings for ecommerce payments</comment>
<group id="adyen_cc_credit_cards" translate="label" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="100">
<label>Credit cards</label>
<field id="adyen_cc_vault" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1"
showInStore="0">
<label>Vault Enabled</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<config_path>payment/adyen_cc_vault/active</config_path>
</field>
<field id="adyen_cc_threeds2" translate="label" type="select" sortOrder="70" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>3DS2.0 Enabled</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<config_path>payment/adyen_cc/threeds2_enabled</config_path>
</field>
<group id="adyen_cc_advanced_settings" translate="label" showInDefault="1" showInWebsite="1" showInStore="1"
sortOrder="150">
<label>Advanced Settings</label>
<frontend_model>Magento\Config\Block\System\Config\Form\Fieldset</frontend_model> <frontend_model>Magento\Config\Block\System\Config\Form\Fieldset</frontend_model>
<field id="enable_moto" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
showInStore="1"> <label>Enabled</label>
<label>Enable MOTO</label>
<tooltip>
<![CDATA[Important you have to activate MOTO for your account contact magento@adyen.com.]]></tooltip>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model> <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<config_path>payment/adyen_cc/enable_moto</config_path> <config_path>payment/adyen_cc/active</config_path>
</field> </field>
<field id="title" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
<field id="installments" translate="label" sortOrder="220" showInDefault="1" showInWebsite="1" <label>Title</label>
showInStore="1"> <config_path>payment/adyen_cc/title</config_path>
<label>Installments</label>
<depends>
<field id="enable_installments">1</field>
</depends>
<tooltip>Configure your installment for each credit card type: Insert the minimum amount required to
make the configured installment available in the amount range column.
Example: if the amount range is configured to 100 and the number of installments to 4x, the shopper
will see the 4x option only if the payment total is higher or equal than 100.
</tooltip>
<frontend_model>Adyen\Payment\Block\Adminhtml\System\Config\Field\Installments</frontend_model>
<backend_model>Adyen\Payment\Model\Config\Backend\Installments</backend_model>
<config_path>payment/adyen_cc/installments</config_path>
</field> </field>
</group> <field id="sort_order" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Sort Order</label>
<group id="adyen_cc_country_specific" translate="label" showInDefault="1" showInWebsite="1" sortOrder="200"> <frontend_class>validate-number</frontend_class>
<label>Country Specific Settings</label> <config_path>payment/adyen_cc/sort_order</config_path>
</field>
<field id="cctypes" translate="label" type="multiselect" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Enabled credit card types</label>
<source_model>Adyen\Payment\Model\Config\Source\CcType</source_model>
<config_path>payment/adyen_cc/cctypes</config_path>
</field>
<field id="adyen_cc_threeds2" translate="label" type="select" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1">
<label>3DS2.0 Enabled</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<config_path>payment/adyen_cc/threeds2_enabled</config_path>
</field>
<include path="Adyen_Payment::system/adyen_cc/store_payment_details_options.xml"/>
<include path="Adyen_Payment::system/adyen_cc/advanced_options.xml"/>
</group> </group>
</group> </group>
</include> </include>
\ No newline at end of file
<?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_cc_advanced_options" translate="label" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="200">
<label>Advanced options</label>
<frontend_model>Magento\Config\Block\System\Config\Form\Fieldset</frontend_model>
<field id="enable_installments" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enable Installments</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<tooltip>Enable installments for each credit card type.</tooltip>
<config_path>payment/adyen_cc/enable_installments</config_path>
</field>
<field id="installments" translate="label" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Installments</label>
<depends>
<field id="enable_installments">1</field>
</depends>
<tooltip>Configure your installment for each credit card type: Insert the minimum amount required to
make the configured installment available in the amount range column.
Example: if the amount range is configured to 100 and the number of installments to 4x, the shopper
will see the 4x option only if the payment total is higher or equal than 100.
</tooltip>
<frontend_model>Adyen\Payment\Block\Adminhtml\System\Config\Field\Installments</frontend_model>
<backend_model>Adyen\Payment\Model\Config\Backend\Installments</backend_model>
<config_path>payment/adyen_cc/installments</config_path>
</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/adyen_cc/allowspecific</config_path>
</field>
<field id="specificcountry" translate="label" type="multiselect" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Payment from Specific Countries</label>
<depends>
<field id="allowspecific">1</field>
</depends>
<source_model>Magento\Directory\Model\Config\Source\Country</source_model>
<can_be_empty>1</can_be_empty>
<config_path>payment/adyen_cc/specificcountry</config_path>
</field>
</group>
</include>
\ No newline at end of file
<?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_cc_store_payment_details_options" translate="label" showInDefault="1" showInWebsite="1" sortOrder="150">
<label>Store payment details options</label>
<frontend_model>Magento\Config\Block\System\Config\Form\Fieldset</frontend_model>
<comment>Adyen can securely store credit card payment details of your shoppers, allowing you to accept recurring payments. For more information please visit our <a href="https://docs.adyen.com/plugins/magento-2">docs</a>.</comment>
<field id="adyen_cc_vault" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Enable Vault</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<config_path>payment/adyen_cc_vault/active</config_path>
</field>
mment>
<field id="store_oneclick" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1">
<label>Store one-click contracts</label>
<source_model>Adyen\Payment\Model\Config\Source\YesNoBillingAgreements</source_model>
<tooltip>To complete the transaction, the shopper needs to enter their CVC/CVV</tooltip>
<config_path>payment/adyen_abstract/enable_oneclick</config_path>
</field>
</group>
</include>
\ No newline at end of file
...@@ -58,14 +58,6 @@ ...@@ -58,14 +58,6 @@
<label>Store shopper details options</label> <label>Store shopper details options</label>
<comment><![CDATA[Adyen can securely store the credit card payment details of your shoppers, allowing you to offer recurring payments. <comment><![CDATA[Adyen can securely store the credit card payment details of your shoppers, allowing you to offer recurring payments.
For more information please visit our <a target="_blank" href="https://docs.adyen.com/">docs.</a>]]></comment> For more information please visit our <a target="_blank" href="https://docs.adyen.com/">docs.</a>]]></comment>
<field id="store_oneclick" translate="label" type="select" sortOrder="10" showInDefault="1"
showInWebsite="1"
showInStore="1">
<label>Store one-click contracts</label>
<tooltip>"To complete the transaction, the shopper needs to enter their CVC/CVV"</tooltip>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<config_path>payment/adyen_abstract/enable_oneclick</config_path>
</field>
<field id="store_recurring" translate="label" type="select" sortOrder="20" showInDefault="1" <field id="store_recurring" translate="label" type="select" sortOrder="20" showInDefault="1"
showInWebsite="1" showInWebsite="1"
showInStore="1"> showInStore="1">
......
...@@ -25,61 +25,61 @@ ...@@ -25,61 +25,61 @@
<payment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <payment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Adyen_Payment:etc/adyen_payment.xsd"> xsi:noNamespaceSchemaLocation="urn:magento:module:Adyen_Payment:etc/adyen_payment.xsd">
<adyen_credit_cards> <adyen_credit_cards>
<type id="AE" order="0"> <type id="AE" order="10">
<label>American Express</label> <label>American Express</label>
<code_alt>amex</code_alt> <code_alt>amex</code_alt>
</type> </type>
<type id="VI" order="10"> <type id="BCMC" order="20">
<label>Visa</label> <label>Bancontact</label>
<code_alt>visa</code_alt> <code_alt>bcmc</code_alt>
</type> </type>
<type id="MC" order="20"> <type id="DANKORT" order="30">
<label>MasterCard</label> <label>Dankort</label>
<code_alt>mc</code_alt> <code_alt>dankort</code_alt>
</type>
<type id="DN" order="40">
<label>Diners</label>
<code_alt>diners</code_alt>
</type> </type>
<type id="DI" order="30"> <type id="DI" order="50">
<label>Discover</label> <label>Discover</label>
<code_alt>discover</code_alt> <code_alt>discover</code_alt>
</type> </type>
<type id="SM" order="40"> <type id="ELO" order="60">
<label>Maestro/Switch</label> <label>Elo</label>
<code_alt>maestro</code_alt> <code_alt>elo</code_alt>
</type>
<type id="HIPERCARD" order="70">
<label>Hipercard</label>
<code_alt>hipercard</code_alt>
</type> </type>
<type id="JCB" order="50"> <type id="JCB" order="80">
<label>JCB</label> <label>JCB</label>
<code_alt>jcb</code_alt> <code_alt>jcb</code_alt>
</type> </type>
<type id="DN" order="60"> <type id="MI" order="90">
<label>Diners</label>
<code_alt>diners</code_alt>
</type>
<type id="MI" order="70">
<label>Maestro</label> <label>Maestro</label>
<code_alt>maestro</code_alt> <code_alt>maestro</code_alt>
</type> </type>
<type id="UN" order="80"> <type id="SM" order="100">
<label>UnionPay</label> <label>Maestro/Switch</label>
<code_alt>cup</code_alt> <code_alt>maestro</code_alt>
</type>
<type id="BCMC" order="90">
<label>Bancontact</label>
<code_alt>bcmc</code_alt>
</type>
<type id="HIPERCARD" order="100">
<label>Hipercard</label>
<code_alt>hipercard</code_alt>
</type> </type>
<type id="ELO" order="110"> <type id="MC" order="110">
<label>Elo</label> <label>MasterCard</label>
<code_alt>elo</code_alt> <code_alt>mc</code_alt>
</type> </type>
<type id="TROY" order="120"> <type id="TROY" order="120">
<label>Troy</label> <label>Troy</label>
<code_alt>troy</code_alt> <code_alt>troy</code_alt>
</type> </type>
<type id="DANKORT" order="130"> <type id="UN" order="130">
<label>Dankort</label> <label>UnionPay</label>
<code_alt>dankort</code_alt> <code_alt>cup</code_alt>
</type>
<type id="VI" order="140">
<label>Visa</label>
<code_alt>visa</code_alt>
</type> </type>
</adyen_credit_cards> </adyen_credit_cards>
</payment> </payment>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment