Skip to content

Commit

Permalink
2.2.0: #3
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Oct 17, 2017
1 parent 223c997 commit 733d474
Show file tree
Hide file tree
Showing 12 changed files with 337 additions and 68 deletions.
5 changes: 4 additions & 1 deletion Block/Js.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
* I have implemented it by analogy with @see \Df\Intl\Js:
* https://github.com/mage2pro/core/blob/3.2.3/Intl/Js.php#L1-L29
* @final Unable to use the PHP «final» keyword here because of the M2 code generation.
* Note 3.
* `Do I need to call Stripe(publishableKey[, options]) constructor
* on every page «to best leverage Stripe’s advanced fraud functionality»?`: https://mage2.pro/t/4704
*/
class Js extends _P {
/**
Expand All @@ -38,6 +41,6 @@ class Js extends _P {
* @return string
*/
final protected function _toHtml() {return !dfps($this)->enable() ? '' : df_js(
null, 'https://js.stripe.com/v2/'
null, 'https://js.stripe.com/v3/'
);}
}
2 changes: 1 addition & 1 deletion Block/Multishipping.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ final protected function _toHtml() {$m = $this->m(); return df_cc_n(
+ df_widget($m, 'multishipping', CP::p())
,df_block_output($m, 'multishipping')
)
,df_link_inline(df_asset_name('multishipping', $m, 'css'))
,df_link_inline(df_asset_name('main', $m, 'css'))
);}
}
4 changes: 3 additions & 1 deletion ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ final class ConfigProvider extends \Df\StripeClone\ConfigProvider {
* @used-by \Df\Payment\ConfigProvider::getConfig()
* @return array(string => mixed)
*/
protected function config() {return ['isUS' => $this->s()->isMerchantInUS()] + parent::config();}
protected function config() {$s = $this->s(); return [
'isUS' => $s->isMerchantInUS(), 'singleLineMode' => $s->b('singleLineMode')
] + parent::config();}
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mage2pro/stripe"
,"version": "2.1.1"
,"version": "2.2.0"
,"description": "The «Stripe» payment extension for Magento 2."
,"type": "magento2-module"
,"homepage": "https://mage2.pro/c/extensions/stripe"
Expand All @@ -11,7 +11,7 @@
"homepage": "https://mage2.pro/users/dmitry_fedyuk",
"role": "Developer"
}]
,"require": {"mage2pro/core": ">=3.2.4", "stripe/stripe-php": "3.*"}
,"require": {"mage2pro/core": ">=3.2.7", "stripe/stripe-php": "3.*"}
,"autoload": {"files": ["registration.php"], "psr-4": {"Dfe\\Stripe\\": ""}}
,"keywords": [
"API"
Expand Down
24 changes: 19 additions & 5 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,25 @@
</depends>
</field>
<field
id='requireBillingAddress'
id='singleLineMode'
showInDefault='1' showInStore='1' showInWebsite='1'
sortOrder='18'
translate='label'
type='Df\Framework\Form\Element\Checkbox'
>
<label>Show the bank card input fields in a single line?</label>
<backend_model>Df\Config\Backend\Checkbox</backend_model>
<comment><![CDATA[]]></comment>
<depends>
<field id='enable'>1</field>
</depends>
</field>
<field
id='requireBillingAddress'
showInDefault='1' showInStore='1' showInWebsite='1'
sortOrder='19'
translate='label'
type='Df\Framework\Form\Element\Checkbox'
>
<label>Require the billing address?</label>
<backend_model>Df\Config\Backend\Checkbox</backend_model>
Expand All @@ -253,7 +267,7 @@
<field
id='min_order_total'
showInDefault='1' showInStore='1' showInWebsite='1'
sortOrder='19'
sortOrder='20'
translate='label'
type='text'
>
Expand All @@ -265,7 +279,7 @@
<field
id='max_order_total'
showInDefault='1' showInStore='1' showInWebsite='1'
sortOrder='20'
sortOrder='21'
translate='label'
type='text'
>
Expand All @@ -277,7 +291,7 @@
<field
id='country_restriction'
showInDefault='1' showInStore='1' showInWebsite='1'
sortOrder='21'
sortOrder='22'
translate='label'
type='select'
>
Expand All @@ -288,7 +302,7 @@
<field
id='countries'
showInDefault='1' showInStore='1' showInWebsite='1'
sortOrder='22'
sortOrder='23'
translate='label'
type='Df\Framework\Form\Element\Multiselect'
>
Expand Down
1 change: 1 addition & 0 deletions view/frontend/layout/checkout_index_index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation='urn:magento:framework:View/Layout/etc/page_configuration.xsd'
>
<head><css src='Dfe_Stripe::main.css'/></head>
<body>
<referenceBlock name='checkout.root'>
<arguments>
Expand Down
4 changes: 2 additions & 2 deletions view/frontend/templates/multishipping.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ https://github.com/magento/magento2/blob/2.2.0-rc2.1/app/code/Magento/Checkout/v
and even <div>-framing for the button does not giux the button in this case. -->
<!-- 2017-08-25
@used-by Dfe_Stripe/multishipping:
lCard.mount($('.inputs', element).get(0));
lCard.mount($('.df-stripe-input', element).get(0));
-->
<div class='inputs'></div>
<div class='df-stripe-input' data-type='card'></div>
<!-- 2017-08-25
The short tag form <div id='card-errors' role='alert' /> does not work here:
the «Pay» button is hidden in this case. -->
Expand Down
Loading

0 comments on commit 733d474

Please sign in to comment.