Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
crefopay
Magento 2
Commits
32e46b20
Commit
32e46b20
authored
Nov 20, 2019
by
Daniel Kazior
💰
Browse files
commit fix
parent
9895a26f
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/code/Trilix/CrefoPay/view/frontend/web/js/model/payment-service.js
View file @
32e46b20
...
...
@@ -3,15 +3,16 @@
define
([
'
jquery
'
,
'
mage/utils/wrapper
'
,
'
Trilix_CrefoPay/js/view/payment/adapter
'
],
function
(
$
,
wrapper
,
adapter
)
{
'
Trilix_CrefoPay/js/view/payment/adapter
'
,
'
Magento_Checkout/js/model/step-navigator
'
],
function
(
$
,
wrapper
,
adapter
,
stepNavigator
)
{
'
use strict
'
;
return
function
(
targetModule
)
{
return
function
(
targetModule
)
{
var
func
=
targetModule
.
setPaymentMethods
;
var
setPaymentMethodsWrapper
=
wrapper
.
wrap
(
func
,
function
(
original
)
{
var
setPaymentMethodsWrapper
=
wrapper
.
wrap
(
func
,
function
(
original
)
{
// check if module is enabled
if
(
window
.
checkoutConfig
.
payment
[
'
crefopay_bill
'
].
isActive
)
{
if
(
window
.
checkoutConfig
.
payment
[
'
crefopay_bill
'
].
isActive
&&
stepNavigator
.
isProcessed
(
'
shipping
'
)
===
false
)
{
adapter
.
initialize
();
}
original
();
...
...
@@ -20,4 +21,4 @@ define([
targetModule
.
setPaymentMethods
=
setPaymentMethodsWrapper
;
return
targetModule
;
};
});
});
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment