Skip to content

Commit

Permalink
0.6.7
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Dec 8, 2017
1 parent 29091e1 commit 419da23
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 7 deletions.
10 changes: 4 additions & 6 deletions Method.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,12 @@ function option() {return $this->iia(self::$II_OPTION);}
* to an unknown `hub.apcld.net` domain?" https://mage2.pro/t/5034
* @used-by \Dfe\AlphaCommerceHub\API\Client::urlBase()
* @used-by \Dfe\AlphaCommerceHub\Init\Action::redirectUrl()
* @param bool $forRedirection [optional]
* @param bool $hpp [optional]
* @return string
*/
function urlBase($forRedirection) {
/** @var string $api */ /** @var string $path */
list($api, $path) = $forRedirection ? ['', $this->s()->payPagePath()] : ['api', ''];
return "https://hub{$api}{$this->test('uat', '')}.alphacommercehub.com.au{$path}";
}
function urlBase($hpp) {$s = $this->s(); /** @var Settings $s */ return 'https://' . implode(
$hpp ? [$s->payPageDomain(), $s->payPagePath()] : [$s->apiDomain(), '']
);}

/**
* 2017-12-06
Expand Down
18 changes: 18 additions & 0 deletions Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
// 2017-10-25
/** @method static Settings s() */
final class Settings extends \Df\Payment\Settings {
/**
* 2017-12-09 «Test API Domain» / «Live API Domain»
* "Provide an ability to a Magento backend user to choose a different AlphaCommerceHub's API domain"?
* https://github.com/mage2pro/alphacommercehub/issues/66
* @used-by \Dfe\AlphaCommerceHub\Method::urlBase()
* @return string
*/
function apiDomain() {return $this->testable();}

/**
* 2017-11-02
* @used-by \Dfe\AlphaCommerceHub\Charge::pCharge()
Expand All @@ -20,6 +29,15 @@ function _3ds() {return dfc($this, function() {return new _3DS($this);});}
*/
function options() {return $this->_options(OptionSource::class);}

/**
* 2017-12-09 «Test Pay Page Domain» / «Live Pay Page Domain»
* "Provide an ability to a Magento backend user to choose a different AlphaHPP domain"?
* https://github.com/mage2pro/alphacommercehub/issues/80
* @used-by \Dfe\AlphaCommerceHub\Method::urlBase()
* @return string
*/
function payPageDomain() {return $this->testable();}

/**
* 2017-11-02 «Test Pay Page Path» / «Live Pay Page Path»
* "[AlphaCommerceHub] What is a «pay page path»"? https://mage2.pro/t/4856
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mage2pro/alphacommercehub"
,"version": "0.6.6"
,"version": "0.6.7"
,"description": "AlphaCommerceHub integration with Magento 2"
,"type": "magento2-module"
,"homepage": "https://mage2.pro/c/extensions/alphacommercehub"
Expand Down
56 changes: 56 additions & 0 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,20 @@ https://mage2.pro/t/4798/2
</depends>
<validate>required-entry</validate>
</field>
<field
id='testPayPageDomain'
showInDefault='1' showInStore='1' showInWebsite='1'
sortOrder='6'
translate='label'
>
<label>Test Pay Page Domain</label>
<comment><![CDATA[<a href='https://github.com/mage2pro/alphacommercehub/issues/80' target='_blank'>Provide an ability to a Magento backend user to choose a different AlphaHPP domain</a>]]></comment>
<validate>required-entry</validate>
<depends>
<field id='enable'>1</field>
<field id='test'>1</field>
</depends>
</field>
<field
id='testPayPagePath'
showInDefault='1' showInStore='1' showInWebsite='1'
Expand All @@ -119,6 +133,20 @@ https://mage2.pro/t/4798/2
<field id='test'>1</field>
</depends>
</field>
<field
id='testApiDomain'
showInDefault='1' showInStore='1' showInWebsite='1'
sortOrder='6'
translate='label'
>
<label>Test API Domain</label>
<comment><![CDATA[<a href='https://github.com/mage2pro/alphacommercehub/issues/66' target='_blank'>Provide an ability to a Magento backend user to choose a different AlphaCommerceHub's API domain</a>]]></comment>
<validate>required-entry</validate>
<depends>
<field id='enable'>1</field>
<field id='test'>1</field>
</depends>
</field>
<field
id='livePrivateKey'
showInDefault='1' showInStore='1' showInWebsite='1'
Expand All @@ -135,6 +163,20 @@ https://mage2.pro/t/4798/2
</depends>
<validate>required-entry</validate>
</field>
<field
id='livePayPageDomain'
showInDefault='1' showInStore='1' showInWebsite='1'
sortOrder='8'
translate='label'
>
<label>Live Pay Page Domain</label>
<comment><![CDATA[<a href='https://github.com/mage2pro/alphacommercehub/issues/80' target='_blank'>Provide an ability to a Magento backend user to choose a different AlphaHPP domain</a>]]></comment>
<validate>required-entry</validate>
<depends>
<field id='enable'>1</field>
<field id='test'>0</field>
</depends>
</field>
<field
id='livePayPagePath'
showInDefault='1' showInStore='1' showInWebsite='1'
Expand All @@ -150,6 +192,20 @@ https://mage2.pro/t/4798/2
<field id='test'>0</field>
</depends>
</field>
<field
id='liveApiDomain'
showInDefault='1' showInStore='1' showInWebsite='1'
sortOrder='8'
translate='label'
>
<label>Live API Domain</label>
<comment><![CDATA[<a href='https://github.com/mage2pro/alphacommercehub/issues/66' target='_blank'>Provide an ability to a Magento backend user to choose a different AlphaCommerceHub's API domain</a>]]></comment>
<validate>required-entry</validate>
<depends>
<field id='enable'>1</field>
<field id='test'>0</field>
</depends>
</field>
<field
id='identification'
showInDefault='1' showInStore='1' showInWebsite='1'
Expand Down
28 changes: 28 additions & 0 deletions etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,20 @@ for the AlphaHPP's `MerchantTxnID` parameter? https://mage2.pro/t/4842
</regex>
<max_length>60</max_length>
</identification_rules>
<!-- 2017-12-09
1) "Why does the «API Integration Guide(Nov 2017)» recommend to send the API requests
to an unknown `hub.apcld.net` domain?": https://mage2.pro/t/5034
2) "Provide an ability to a Magento backend user to choose a different AlphaCommerceHub's API domain":
https://github.com/mage2pro/alphacommercehub/issues/66
-->
<liveApiDomain>hubapi.alphacommercehub.com.au</liveApiDomain>
<!-- 2017-12-09
1) "Why does the «API Integration Guide(Nov 2017)» recommend to send the API requests
to an unknown `hub.apcld.net` domain?": https://mage2.pro/t/5034
2) "Provide an ability to a Magento backend user to choose a different AlphaHPP domain":
https://github.com/mage2pro/alphacommercehub/issues/80
-->
<livePayPageDomain>hub.alphacommercehub.com.au</livePayPageDomain>
<optionsAllowed>CC,PP,PO</optionsAllowed>
<optionsDescription><![CDATA[On clicking the «<b>Place Order</b>» button you will be redirected to the AlphaCommerceHub payment page, and the following payment options will be available: {options}.]]></optionsDescription>
<optionsDisplayMode>images</optionsDisplayMode>
Expand All @@ -52,6 +66,20 @@ for the AlphaHPP's `MerchantTxnID` parameter? https://mage2.pro/t/4842
<requireBillingAddress>0</requireBillingAddress>
<title>AlphaCommerceHub</title>
<title_backend>AlphaCommerceHub</title_backend>
<!-- 2017-12-09
1) "Why does the «API Integration Guide(Nov 2017)» recommend to send the API requests
to an unknown `hub.apcld.net` domain?": https://mage2.pro/t/5034
2) "Provide an ability to a Magento backend user to choose a different AlphaHPP domain":
https://github.com/mage2pro/alphacommercehub/issues/80
-->
<testApiDomain>hubapiuat.alphacommercehub.com.au</testApiDomain>
<!-- 2017-12-09
1) "Why does the «API Integration Guide(Nov 2017)» recommend to send the API requests
to an unknown `hub.apcld.net` domain?": https://mage2.pro/t/5034
2) "Provide an ability to a Magento backend user to choose a different AlphaHPP domain":
https://github.com/mage2pro/alphacommercehub/issues/80
-->
<testPayPageDomain>hubuat.alphacommercehub.com.au</testPayPageDomain>
</alpha_commerce_hub>
</df_payment>
<payment>
Expand Down

0 comments on commit 419da23

Please sign in to comment.