Skip to content

Commit

Permalink
0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Sep 19, 2017
1 parent ae9d759 commit fa2e3fc
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 19 deletions.
28 changes: 15 additions & 13 deletions ConfigProvider.php
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
<?php
namespace Dfe\YandexKassa;
use Df\Payment\Settings\Options as O;
use Df\Payment\ConfigProvider\IOptions;
// 2017-09-17
final class ConfigProvider extends \Df\Payment\ConfigProvider {
/** @method Settings s() */
final class ConfigProvider extends \Df\Payment\ConfigProvider implements IOptions {
/**
* 2017-09-18
* @override
* @see \Df\Payment\ConfigProvider\IOptions::options()
* @used-by \Df\Payment\ConfigProvider::configOptions()
* @return array(<value> => <label>)
*/
function options() {return $this->s()->options()->o(true);}

/**
* 2017-09-17
* @override
* @see \Df\Payment\ConfigProvider::config()
* @used-by \Df\Payment\ConfigProvider::getConfig()
* @return array(string => mixed)
*/
protected function config() {
$s = $this->s(); /** @var Settings $s */
$o = $s->options(); /** @var O $o */
return [
'needShowOptions' => $o->needShow()
// 2017-09-17
// @used-by Df_Payments/withOptions::options()
// https://github.com/mage2pro/core/blob/2.0.36/Payment/view/frontend/web/withOptions.js?ts=4#L55
,'options' => $o->o(true)
] + parent::config();
}
protected function config() {return self::configOptions($this) + parent::config() + [
'needShowOptions' => $this->s()->options()->needShow()
];}
}
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.1.1"
,"version": "0.1.2"
,"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.5"}
,"require": {"mage2pro/core": ">=2.12.6"}
,"autoload": {"files": ["registration.php"], "psr-4": {"Dfe\\YandexKassa\\": ""}}
,"keywords": [
"API"
Expand Down
6 changes: 3 additions & 3 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,14 @@
<depends><field id='enable'>1</field></depends>
</field>
<field
id='optionsDescription'
id='optionsPrompt'
showInDefault='1' showInStore='1' showInWebsite='1'
sortOrder='11'
translate='label'
type='textarea'
>
<label>A text above the options</label>
<comment><![CDATA[You can use HTML tags. Also you set it empty.]]></comment>
<label>Options Prompt</label>
<comment><![CDATA[A text above the Yandex.Kassa payment options on the Magento checkout page.<br/>You can use the HTML tags. Also you set the desciption empty to hide it.]]></comment>
<depends>
<field id='enable'>1</field>
<field id='optionsLocation'>magento</field>
Expand Down
2 changes: 1 addition & 1 deletion etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ https://tech.yandex.com/money/doc/payment-solution/payment-form/payment-form-htt
<max_length>64</max_length>
</identification_rules>
<optionsAllowed>AB,AC,EP,GP,KV,MA,MC,MP,PB,PC,QW,SB,WM</optionsAllowed>
<optionsDescription><![CDATA[Пожалуйста, выберите способ оплаты и нажмите внизу кнопку «<b>Оплатить</b>»]]></optionsDescription>
<optionsLocation>magento</optionsLocation>
<optionsPrompt><![CDATA[Пожалуйста, выберите способ оплаты и нажмите внизу кнопку «<b>Оплатить</b>»]]></optionsPrompt>
<requireBillingAddress>1</requireBillingAddress>
<payment_action>authorize_capture</payment_action>
<title>Яндекс.Касса</title>
Expand Down

0 comments on commit fa2e3fc

Please sign in to comment.