Skip to content

Commit

Permalink
1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Sep 19, 2017
1 parent 1adb636 commit 95019d6
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 10 deletions.
16 changes: 12 additions & 4 deletions ConfigProvider.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
<?php
namespace Dfe\IPay88;
use Df\Payment\ConfigProvider\IOptions;
use Dfe\IPay88\Source\Option as Opt;
// 2017-04-10
final class ConfigProvider extends \Df\Payment\ConfigProvider {
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 Opt::s()->map();}

/**
* 2017-04-13
* @override
* @see \Df\Payment\ConfigProvider::config()
* @used-by \Df\Payment\ConfigProvider::getConfig()
* @return array(string => mixed)
*/
protected function config() {/** @var Settings $s */ $s = $this->s(); return [
'options' => Opt::s()->map()
] + parent::config();}
protected function config() {return self::configOptions($this) + parent::config();}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ https://www.youtube.com/watch?v=hgg7cu9y57c&list=PLTq8uOpBQGsEVWfTrncggf2XnngZYa
![](https://mage2.pro/uploads/default/original/2X/1/1dee0f99fb61c022e5ce5ab7b59df4287a15e224.png)

### Backend settings
![](https://mage2.pro/uploads/default/original/2X/4/4d40d08ae63979ba87948b3e415a2020ee4f9f76.png)
![](https://mage2.pro/uploads/default/original/2X/0/004d209981afe8955ec72c1431cfbeb8110f985a.png)

## The available payment options for Malaysia
- [Affin Bank](https://www.affinbank.com.my) ([affinOnline](http://www.affinonline.com))
Expand Down
4 changes: 2 additions & 2 deletions Source/Option.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ function all() {return $this->map() + df_module_json($this, 'options/multicurren
* @see \Df\Config\Source::map()
* @used-by all()
* @used-by \Df\Config\Source::toOptionArray()
* @used-by \Dfe\IPay88\ConfigProvider::config()
* @return array(int => string)
* @used-by \Dfe\IPay88\ConfigProvider::options()
* @return array(<value> => <label>)
*/
function map() {return df_module_json($this, 'options/myr');}
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mage2pro/ipay88"
,"version": "1.2.1"
,"version": "1.3.0"
,"description": "The «iPay88» payment extension for Magento 2."
,"type": "magento2-module"
,"homepage": "https://mage2.pro/c/extensions/ipay88"
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.6"}
,"autoload": {"files": ["registration.php"], "psr-4": {"Dfe\\IPay88\\": ""}}
,"keywords": [
"API"
Expand Down
15 changes: 14 additions & 1 deletion etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,24 @@ because the value can contain variables, so do not know the real length here. --
<validate>required-entry</validate>
<depends><field id='enable'>1</field></depends>
</field>
<field
id='optionsPrompt'
showInDefault='1' showInStore='1' showInWebsite='1'
sortOrder='9'
translate='label'
type='textarea'
>
<label>Options Prompt</label>
<comment><![CDATA[A text above the iPay88 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>
</depends>
</field>
<field
dfRows='4'
id='messageFailure'
showInDefault='1' showInStore='1' showInWebsite='1'
sortOrder='9'
sortOrder='10'
translate='label'
type='Df\Framework\Form\Element\Textarea'
>
Expand Down
1 change: 1 addition & 0 deletions etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<messageFailure><![CDATA[Sorry, the payment attempt is failed.
<br/>The payment service's message is «<b>{originalMessage}</b>».
<br/>Please try again, or try another payment method.]]></messageFailure>
<optionsPrompt><![CDATA[Please select a payment option:]]></optionsPrompt>
<requireBillingAddress>1</requireBillingAddress>
<payment_action>authorize_capture</payment_action>
<title>iPay88</title>
Expand Down

0 comments on commit 95019d6

Please sign in to comment.