Your personal data will be used to process your order, support your experience throughout this website, and for other purposes described in our Privacy policy.
function intval_checkout_v3_ready(f) {
/in/.test(document.readyState) ? setTimeout('intval_checkout_v3_ready(' + f + ')', 9) : f()
}
intval_checkout_v3_ready(function () {
grecaptcha.ready(function () {
grecaptcha.execute('6LcAG78eAAAAAGKN3pAW2R-BFBPaFbOj162o_CWB', { action: 'checkout' }).then(function (token) {
var myNodeList = document.querySelectorAll('.i13_checkout_token');
Array.from(myNodeList).forEach(function(el) {
el.value = token;
});
var myNodeList2 = document.querySelectorAll('.fallback_i13_checkout_token');
Array.from(myNodeList2).forEach(function(el2) {
el2.value = token;
});
}, function (reason) {
});
});
var checkout_form = jQuery('form.checkout');
jQuery(document).on('updated_checkout', function () {
grecaptcha.execute('6LcAG78eAAAAAGKN3pAW2R-BFBPaFbOj162o_CWB', { action: 'checkout' }).then(function (token) {
var myNodeList = document.querySelectorAll('.i13_checkout_token');
Array.from(myNodeList).forEach(function(el) {
el.value = token;
});
}, function (reason) {
});
});
jQuery(document).on('checkout_error', function () {
grecaptcha.execute('6LcAG78eAAAAAGKN3pAW2R-BFBPaFbOj162o_CWB', { action: 'checkout' }).then(function (token) {
var myNodeList = document.querySelectorAll('.i13_checkout_token');
Array.from(myNodeList).forEach(function(el) {
el.value = token;
});
}, function (reason) {
});
});
jQuery(document).ajaxComplete(function() {
if (jQuery(".woocommerce-error").is(":visible") || jQuery(".woocommerce_error").is(":visible")){
grecaptcha.execute('6LcAG78eAAAAAGKN3pAW2R-BFBPaFbOj162o_CWB', { action: 'checkout' }).then(function (token) {
var myNodeList = document.querySelectorAll('.i13_checkout_token');
Array.from(myNodeList).forEach(function(el) {
el.value = token;
});
}, function (reason) {
});
}
});
jQuery(document).on('payment_method_selected', function () {
grecaptcha.execute('6LcAG78eAAAAAGKN3pAW2R-BFBPaFbOj162o_CWB', { action: 'checkout' }).then(function (token) {
var myNodeList = document.querySelectorAll('.i13_checkout_token');
Array.from(myNodeList).forEach(function(el) {
el.value = token;
});
}, function (reason) {
});
});
setInterval(function() {
grecaptcha.execute('6LcAG78eAAAAAGKN3pAW2R-BFBPaFbOj162o_CWB', { action: 'checkout' }).then(function (token) {
var myNodeList = document.querySelectorAll('.fallback_i13_checkout_token');
Array.from(myNodeList).forEach(function(el) {
el.value = token;
});
});
}, 70 * 1000);
jQuery(document).ajaxSend(function(event, jqXHR, ajaxOptions) {
if(ajaxOptions.url.indexOf('wc-ajax=checkout') !== -1 || ajaxOptions.url.indexOf('wc-ajax=wcpay_create_order') !== -1 || ajaxOptions.url.indexOf('wc-ajax=wc_ajax_square_digital_wallet_process_checkout') !== -1){
var myNodeList = document.querySelectorAll('.fallback_i13_checkout_token');
Array.from(myNodeList).forEach(function(el) {
ajaxOptions.data += '&fallback_i13_checkout_token='+el.value;
});
}
});
});