Spamworldpro Mini Shell
Spamworldpro


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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/corals/old/vendor/magento/module-vault/view/frontend/web/js/view/payment/vault-enabler.js
/**
 * 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;
            }
        });
    }
);

Spamworldpro Mini