Commit 0aceb249 authored by Alessio Zampatti's avatar Alessio Zampatti Committed by GitHub

PW-1687: UI Payment methods > Stored billing agreements (#584)

parent 4c2b5084
...@@ -213,9 +213,9 @@ class Data extends AbstractHelper ...@@ -213,9 +213,9 @@ class Data extends AbstractHelper
public function getRecurringTypes() public function getRecurringTypes()
{ {
return [ return [
\Adyen\Payment\Model\RecurringType::ONECLICK => 'ONECLICK', \Adyen\Payment\Model\RecurringType::ONECLICK => 'One-click',
\Adyen\Payment\Model\RecurringType::ONECLICK_RECURRING => 'ONECLICK,RECURRING', \Adyen\Payment\Model\RecurringType::ONECLICK_RECURRING => 'One-click,Recurring',
\Adyen\Payment\Model\RecurringType::RECURRING => 'RECURRING' \Adyen\Payment\Model\RecurringType::RECURRING => 'Recurring'
]; ];
} }
......
...@@ -27,9 +27,9 @@ class RecurringType ...@@ -27,9 +27,9 @@ class RecurringType
{ {
const NONE = ''; const NONE = '';
const ONECLICK = 'ONECLICK'; const ONECLICK = 'One-click';
const ONECLICK_RECURRING = 'ONECLICK,RECURRING'; const ONECLICK_RECURRING = 'One-click,Recurring';
const RECURRING = 'RECURRING'; const RECURRING = 'Recurring';
/** /**
* @var array * @var array
......
...@@ -24,10 +24,10 @@ ...@@ -24,10 +24,10 @@
--> -->
<include xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_include.xsd"> <include xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_include.xsd">
<group id="adyen_oneclick" translate="label" type="text" sortOrder="150" showInDefault="1" showInWebsite="1" showInStore="1"> <group id="adyen_oneclick" translate="label" type="text" sortOrder="150" showInDefault="1" showInWebsite="1" showInStore="1">
<label><![CDATA[Stored Payment Methods - Requires Adyen Credit Card]]></label> <label><![CDATA[Stored billing agreements]]></label>
<frontend_model>Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group</frontend_model> <frontend_model>Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group</frontend_model>
<fieldset_css>adyen-method-adyen-cc</fieldset_css> <fieldset_css>adyen-method-adyen-cc</fieldset_css>
<comment><![CDATA[During checkout shoppers can choose to have their payment details remembered and stored for trusted websites in Adyen’s highly secure platform. Adyen takes care of this process for its customers. Shoppers can then select the stored payment method in the checkout.]]></comment> <comment><![CDATA[Display any shopper credit cards or local payment methods stored as billing agreements]]></comment>
<field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enabled</label> <label>Enabled</label>
...@@ -38,25 +38,15 @@ ...@@ -38,25 +38,15 @@
<label>Title</label> <label>Title</label>
<config_path>payment/adyen_oneclick/title</config_path> <config_path>payment/adyen_oneclick/title</config_path>
</field> </field>
<field id="sort_order" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> <field id="sort_order" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Sort Order</label> <label>Sort Order</label>
<frontend_class>validate-number</frontend_class> <frontend_class>validate-number</frontend_class>
<config_path>payment/adyen_oneclick/sort_order</config_path> <config_path>payment/adyen_oneclick/sort_order</config_path>
</field> </field>
<field id="recurring_payment_type" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> <field id="recurring_payment_type" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Agreement Type</label> <label>Type of billing agreements to display</label>
<tooltip>With ONECLICK the shopper needs to fill in their security code for credit cards. For RECURRING, this is not needed. If you want to use RECURRING make sure you have Agreement Type set to RECURRING or ONECLICK,RECURRING</tooltip>
<source_model>Adyen\Payment\Model\Config\Source\RecurringPaymentType</source_model> <source_model>Adyen\Payment\Model\Config\Source\RecurringPaymentType</source_model>
<config_path>payment/adyen_oneclick/recurring_payment_type</config_path> <config_path>payment/adyen_oneclick/recurring_payment_type</config_path>
</field> </field>
<group id="adyen_oneclick_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="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Share billing agreements between stores</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<config_path>payment/adyen_oneclick/share_billing_agreement</config_path>
</field>
</group>
</group> </group>
</include> </include>
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
<adyen_oneclick> <adyen_oneclick>
<active>1</active> <active>1</active>
<model>AdyenPaymentOneclickFacade</model> <model>AdyenPaymentOneclickFacade</model>
<title>Adyen Stored Payment Methods</title> <title>Adyen stored billing agreements</title>
<allowspecific>0</allowspecific> <allowspecific>0</allowspecific>
<sort_order>1</sort_order> <sort_order>1</sort_order>
<cctypes>AE,VI,MC,DI</cctypes> <!-- important to show the payment method isAvailabe()--> <cctypes>AE,VI,MC,DI</cctypes> <!-- important to show the payment method isAvailabe()-->
......
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