function initializeAccountEvents() {
  checkoutConfiguration = window.Configuration;
  checkout = new AdyenCheckout(checkoutConfiguration);
  const newCard = document.getElementById('newCard');
  let adyenStateData;
  let isValid = false;
  const node = checkout
    .create('card', {
      hasHolderName: true,
      holderNameRequired: true,
      onChange(state) {
        adyenStateData = state.data;
        isValid = state.isValid;
      },
    })
    .mount(newCard);

  $('#applyBtn').on('click', () => {
    if (!isValid) {
      node.showValidation();
      return false;
    }
    document.querySelector('#adyenStateData').value = JSON.stringify(
      adyenStateData,
    );
  });
}
/**
 * @function
 * @description Initializes Adyen Checkout My Account events
 */
@function
@description Initializes Adyen Checkout My Account events
@function @description Initializes Adyen Checkout My Account events
function initializeAccountEvents() {
  checkoutConfiguration = window.Configuration;
  checkout = new AdyenCheckout(checkoutConfiguration);
  const newCard = document.getElementById('newCard');
  let adyenStateData;
  let isValid = false;
  const node = checkout
    .create('card', {
      hasHolderName: true,
      holderNameRequired: true,
      onChange(state) {
        adyenStateData = state.data;
        isValid = state.isValid;
      },
    })
    .mount(newCard);
  $('#applyBtn').on('click', () => {
    if (!isValid) {
      node.showValidation();
      return false;
    }
    document.querySelector('#adyenStateData').value = JSON.stringify(
      adyenStateData,
    );
  });
}
function initializeAccountEvents ( ) { checkoutConfiguration = window . Configuration ; checkout = new AdyenCheckout ( checkoutConfiguration ) ; const newCard = document . getElementById ( 'newCard' ) ; let adyenStateData ; let isValid = false ; const node = checkout . create ( 'card' , { hasHolderName : true , holderNameRequired : true , onChange ( state ) { adyenStateData = state . data ; isValid = state . isValid ; } , } ) . mount ( newCard ) ; $ ( '#applyBtn' ) . on ( 'click' , ( ) => { if ( ! isValid ) { node . showValidation ( ) ; return false ; } document . querySelector ( '#adyenStateData' ) . value = JSON . stringify ( adyenStateData , ) ; } ) ; }
@function
 @description Initializes Adyen Checkout My Account events
@function @description Initializes Adyen Checkout My Account events