Skip to content

Commit

Permalink
0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Sep 16, 2017
1 parent f1f30e8 commit 3dddebc
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 2 deletions.
15 changes: 15 additions & 0 deletions Source/Option.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
namespace Dfe\YandexKassa\Source;
// 2017-09-16
/** @method static Option s() */
final class Option extends \Df\Config\Source {
/**
* @override
* @see \Df\Config\Source::map()
* @used-by \Df\Config\Source::toOptionArray()
* @return array(string => string)
*/
protected function map() {return df_sort_names(df_map(function(array $a) {return dfa_deep(
$a, 'title/' . df_lang_ru_en()
);}, df_module_json($this, 'options')));}
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mage2pro/yandex-kassa"
,"version": "0.0.9"
,"version": "0.1.0"
,"description": "The «Yandex.Kassa» (Яндекс.Касса, Yandex.Checkout) payment extension for Magento 2."
,"type": "magento2-module"
,"homepage": "https://mage2.pro/c/extensions/yandex-kassa"
Expand All @@ -11,7 +11,7 @@
"homepage": "https://mage2.pro/users/dmitry_fedyuk",
"role": "Developer"
}]
,"require": {"mage2pro/core": ">=2.12.3"}
,"require": {"mage2pro/core": ">=2.12.4"}
,"autoload": {"files": ["registration.php"], "psr-4": {"Dfe\\YandexKassa\\": ""}}
,"keywords": [
"API"
Expand Down
32 changes: 32 additions & 0 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,38 @@
<comment><![CDATA[]]></comment>
<depends><field id='enable'>1</field></depends>
</field>
<field
id='optionsLimit'
showInDefault='1' showInStore='1' showInWebsite='1'
sortOrder='11'
translate='label'
type='Df\Framework\Form\Element\Checkbox'
>
<label>Limit the payment options availability?</label>
<backend_model>Df\Config\Backend\Checkbox</backend_model>
<comment><![CDATA[If checked, only the selected options will be shown to the customers.]]></comment>
<depends>
<field id='enable'>1</field>
<field id='optionsLocation'>magento</field>
</depends>
</field>
<field
id='optionsAllowed'
showInDefault='1' showInStore='1' showInWebsite='1'
sortOrder='12'
translate='label'
type='Df\Framework\Form\Element\Multiselect'
>
<label>Allowed Payment Options</label>
<source_model>Dfe\YandexKassa\Source\Option</source_model>
<comment><![CDATA[Only the selected options will be shown to the customers on the Magento checkout screen.]]></comment>
<validate>required-entry</validate>
<depends>
<field id='enable'>1</field>
<field id='optionsLimit'>1</field>
<field id='optionsLocation'>magento</field>
</depends>
</field>
<field
id='requireBillingAddress'
translate='label'
Expand Down
2 changes: 2 additions & 0 deletions etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ https://tech.yandex.com/money/doc/payment-solution/payment-form/payment-form-htt
<identification_rules>
<max_length>64</max_length>
</identification_rules>
<optionsAllowed>AB,AC,EP,GP,KV,MA,MC,MP,PB,PC,QW,SB,WM</optionsAllowed>
<optionsLocation>magento</optionsLocation>
<requireBillingAddress>1</requireBillingAddress>
<payment_action>authorize_capture</payment_action>
<title>Яндекс.Касса</title>
Expand Down

0 comments on commit 3dddebc

Please sign in to comment.