We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday in our country

Commit f7b1ab1e authored by Alessio Zampatti's avatar Alessio Zampatti Committed by acampos1916

PW-1688: UI Alternative Payment Methods => Local Payment Methods (#583)

* PW-1688: UI Alternative Payment Methods => Local Payment Methods

* Update Model/Config/Source/SplitPaymentRefundStrategy.php
Co-Authored-By: default avatarMarcos Garcia <marcos.asgarcia@gmail.com>

* fixed capital

* Extended YesNo with changed label for billing agreements

* remove unused file

* fix typo
parent fa7a14ab
......@@ -44,8 +44,8 @@ class SplitPaymentRefundStrategy implements \Magento\Framework\Option\ArrayInter
{
return [
self::REFUND_FIRST_PAYEMENT_FIRST => __('Refund from first payment first'),
self::REFUND_LAST_PAYEMENT_FIRST => 'Refund from last payment first',
self::REFUND_ON_RATIO => __('refund based on ratio')
self::REFUND_LAST_PAYEMENT_FIRST => __('Refund from last payment first'),
self::REFUND_ON_RATIO => __('Refund based on ratio')
];
}
}
<?php
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment Module
*
* Copyright (c) 2019 Adyen B.V.
* This file is open source and available under the MIT license.
* See the LICENSE file for more info.
*
* Author: Adyen <magento@adyen.com>
*/
namespace Adyen\Payment\Model\Config\Source;
class YesNoBillingAgreements extends \Magento\Config\Model\Config\Source\YesNo
{
/**
* Options getter
*
* @return array
*/
public function toOptionArray()
{
return [['value' => 1, 'label' => __('Yes - as billing agreement')], ['value' => 0, 'label' => __('No')]];
}
}
......@@ -24,7 +24,7 @@
-->
<include xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_include.xsd">
<group id="adyen_hpp" translate="label" type="text" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1">
<label><![CDATA[Alternative payment methods]]></label>
<label><![CDATA[Local payment methods]]></label>
<frontend_model>Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group</frontend_model>
<fieldset_css>adyen-method-adyen-cc</fieldset_css>
<comment>Process alternative payments methods</comment>
......@@ -33,44 +33,55 @@
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<config_path>payment/adyen_hpp/active</config_path>
</field>
<field id="title" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Title</label>
<comment>The title of each local payment method is set automatically.</comment>
<config_path>payment/adyen_hpp/title</config_path>
</field>
<field id="sort_order" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Sort Order</label>
<label>Sort order</label>
<frontend_class>validate-number</frontend_class>
<config_path>payment/adyen_hpp/sort_order</config_path>
</field>
<group id="adyen_hpp_openinvoice_settings" translate="label" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="100">
<label>Klarna\RatePay\Afterpay Settings</label>
<group id="adyen_hpp_store_payment_details" translate="label" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="100">
<label>Store payment details options</label>
<comment>Adyen can securely store the payment details for select local payment methods of your shoppers, allowing you to accept recurring payments.</comment>
<frontend_model>Magento\Config\Block\System\Config\Form\Fieldset</frontend_model>
<field id="ratepay_id" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
<label>RatePAY Device Ident SId</label>
<tooltip>Unique RatePAY Id provided by RatePAY integration consultant</tooltip>
<config_path>payment/adyen_hpp/ratepay_id</config_path>
<field id="enable_recurring" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>Store recurring contracts</label>
<source_model>Adyen\Payment\Model\Config\Source\YesNoBillingAgreements</source_model>
<config_path>payment/adyen_hpp/enable_recurring</config_path>
</field>
</group>
<group id="adyen_hpp_advanced_settings" translate="label" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="200">
<label>Advanced Settings</label>
<label>Advanced options</label>
<frontend_model>Magento\Config\Block\System\Config\Form\Fieldset</frontend_model>
<field id="title" translate="label" type="text" sortOrder="65" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Title</label>
<config_path>payment/adyen_hpp/title</config_path>
<field id="ratepay_id" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>RatePAY Device Ident SId</label>
<config_path>payment/adyen_hpp/ratepay_id</config_path>
</field>
<field id="giftcards_refunds" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Giftcard refunds</label>
<source_model>Adyen\Payment\Model\Config\Source\SplitPaymentRefundStrategy</source_model>
<config_path>payment/adyen_hpp/giftcards_refunds</config_path>
</field>
<field id="country_code" translate="label" type="text" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="1">
<label>ISO Country Code (optional)</label>
<tooltip>This will override the shopper billing address country when determining what payment methods to display.</tooltip>
<field id="country_code" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Override country code</label>
<comment><![CDATA[ Must be in <a target="_blank" href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2"> ISO 3166-1 alpha-2</a> format. For example: NL or DE]]></comment>
<config_path>payment/adyen_hpp/country_code</config_path>
</field>
</group>
<group id="adyen_hpp_country_specific" translate="label" showInDefault="1" showInWebsite="1" showInStore="0" sortOrder="210">
<label>Country Specific Settings</label>
<frontend_model>Magento\Config\Block\System\Config\Form\Fieldset</frontend_model>
<field id="allowspecific" translate="label" type="allowspecific" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Payment from Applicable Countries</label>
<label>Payment from applicable countries</label>
<source_model>Magento\Payment\Model\Config\Source\Allspecificcountries</source_model>
<config_path>payment/adyen_hpp/allowspecific</config_path>
</field>
<field id="specificcountry" translate="label" type="multiselect" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Payment from Specific Countries</label>
<label>Payment from specific countries</label>
<source_model>Magento\Directory\Model\Config\Source\Country</source_model>
<depends>
<field id="allowspecific">1</field>
</depends>
<can_be_empty>1</can_be_empty>
<config_path>payment/adyen_hpp/specificcountry</config_path>
</field>
......
......@@ -111,7 +111,7 @@
<active>0</active>
<model>AdyenPaymentHppFacade</model>
<order_status>pending</order_status>
<title>Alternative payment methods</title>
<title>Local payment methods</title>
<allowspecific>0</allowspecific>
<ratepay_id>oj9GsQ</ratepay_id>
<sort_order>3</sort_order>
......
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