-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/v6.2.0' into 'master'
release/v6.2.0 into master See merge request agence-dnd/marketplace/magento-2/external/module-checkout-magento2-plugin!213
- Loading branch information
Showing
11 changed files
with
123 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/** | ||
* Checkout.com | ||
* Authorized and regulated as an electronic money institution | ||
* by the UK Financial Conduct Authority (FCA) under number 900816. | ||
* | ||
* PHP version 7 | ||
* | ||
* @category Magento2 | ||
* @package Checkout.com | ||
* @author Platforms Development Team <[email protected]> | ||
* @copyright 2010-present Checkout.com | ||
* @license https://opensource.org/licenses/mit-license.html MIT License | ||
* @link https://docs.checkout.com/ | ||
*/ | ||
|
||
define([ | ||
'jquery', | ||
'CheckoutCom_Magento2/js/view/payment/utilities', | ||
'Magento_Checkout/js/model/step-navigator', | ||
'Magento_Checkout/js/action/set-payment-information' | ||
], function ($, Utilities, StepNavigator, setPaymentInformationAction) { | ||
'use strict'; | ||
|
||
const PAYMENT_STEP_CODE = 'payment'; | ||
|
||
return { | ||
|
||
/** | ||
* Workaround to refresh payment method information when guest customer | ||
* go back to shipping step & change his email address | ||
* | ||
* @param {UiClass} Component | ||
* @public | ||
*/ | ||
initSubscribers: function (Component) { | ||
const code = Component.getCode(); | ||
|
||
StepNavigator.steps.subscribe((steps) => { | ||
if (this.getCurrentCheckoutStep(steps) === PAYMENT_STEP_CODE && | ||
Utilities.methodIsSelected(code)) { | ||
setPaymentInformationAction(Component.messageContainer, { | ||
method: code | ||
}); | ||
} | ||
}); | ||
}, | ||
|
||
/** | ||
* Return current checkout step code | ||
* | ||
* @param {Array} steps | ||
* @return string | ||
* @public | ||
*/ | ||
getCurrentCheckoutStep: function (steps) { | ||
return steps[StepNavigator.getActiveItemIndex()]['code']; | ||
} | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters