const paymentLoader = '.payment-loader';
const paymentLoaderHideClass = 'payment-loader--hidden';
const applePayButton = '.apple__button';
const googlePayButton = '.google__button';

const showPaymentLoader = () => {
  $(paymentLoader).removeClass(paymentLoaderHideClass);
  setTimeout(() => $(paymentLoader).addClass(paymentLoaderHideClass), 1000);
};

$(document).on('click', applePayButton, showPaymentLoader);
$(document).on('click', googlePayButton, showPaymentLoader);
