![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magento/module-vault/view/frontend/web/js/view/payment/ |
/** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ /*browser:true*/ /* @api */ define( [ 'uiElement' ], function ( Component ) { 'use strict'; return Component.extend({ defaults: { isActivePaymentTokenEnabler: true }, /** * @param {String} paymentCode */ setPaymentCode: function (paymentCode) { this.paymentCode = paymentCode; }, /** * @returns {Object} */ initObservable: function () { this._super() .observe([ 'isActivePaymentTokenEnabler' ]); return this; }, /** * @param {Object} data */ visitAdditionalData: function (data) { if (!this.isVaultEnabled()) { return; } if (!('additional_data' in data)) { data['additional_data'] = {}; } data['additional_data']['is_active_payment_token_enabler'] = this.isActivePaymentTokenEnabler(); }, /** * @returns {Boolean} */ isVaultEnabled: function () { return typeof window.checkoutConfig.vault[this.paymentCode] !== 'undefined' && window.checkoutConfig.vault[this.paymentCode]['is_enabled'] === true; } }); } );