Skip to content

Commit 0ddf8bf

Browse files
Embedded card autosave
Added the vault card auto save feature to the embedded integration.
1 parent c656d04 commit 0ddf8bf

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

view/frontend/web/js/view/payment/method-renderer/embedded.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,13 @@ define(
113113
return CheckoutCom.getPaymentConfig()['quote_currency'];
114114
},
115115

116+
/**
117+
* @returns {bool}
118+
*/
119+
isCardAutosave: function() {
120+
return CheckoutCom.getPaymentConfig()['card_autosave'];
121+
},
122+
116123
/**
117124
* @returns {string}
118125
*/

view/frontend/web/template/payment/embedded.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<!--/ko-->
4343
</div>
4444

45-
<!-- ko if: (isVaultEnabled())-->
45+
<!-- ko if: ((isVaultEnabled()) && !isCardAutosave()) -->
4646
<div class="field choice">
4747
<input type="checkbox" name="vault[is_enabled]" class="checkbox" data-bind="attr: {'id': getCode() + '_enable_vault'}, checked: vaultEnabler.isActivePaymentTokenEnabler" />
4848
<label class="label" data-bind="attr: {'for': getCode() + '_enable_vault'}">

0 commit comments

Comments
 (0)