File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
app/code/Magento/Braintree/view/frontend/web
js/view/payment/method-renderer Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ define([
61
61
} ,
62
62
63
63
/**
64
- * @returns {Bool }
64
+ * @returns {Boolean }
65
65
*/
66
66
isVaultEnabled : function ( ) {
67
67
return this . vaultEnabler . isVaultEnabled ( ) ;
@@ -142,11 +142,20 @@ define([
142
142
return true ;
143
143
} ,
144
144
145
+ /**
146
+ * Returns state of place order button
147
+ * @returns {Boolean }
148
+ */
149
+ isButtonActive : function ( ) {
150
+ return this . isActive ( ) && this . isPlaceOrderActionAllowed ( ) ;
151
+ } ,
152
+
145
153
/**
146
154
* Trigger order placing
147
155
*/
148
156
placeOrderClick : function ( ) {
149
157
if ( this . validateCardType ( ) ) {
158
+ this . isPlaceOrderActionAllowed ( false ) ;
150
159
$ ( this . getSelector ( 'submit' ) ) . trigger ( 'click' ) ;
151
160
}
152
161
} ,
Original file line number Diff line number Diff line change 141
141
data-bind ="
142
142
click: placeOrderClick,
143
143
attr: {title: $t('Place Order')},
144
- css: {disabled: !isPlaceOrderActionAllowed()},
145
- enable: isActive()
144
+ enable: isButtonActive()
146
145
"
147
146
disabled >
148
147
< span data-bind ="i18n: 'Place Order' "> </ span >
You can’t perform that action at this time.
0 commit comments