'); $('.sso-login-box-wrapper').click(function() { $('.sso-login-box-wrapper').remove(); }); } function dnt_piano_check_pending_checkout() { let cookie_value = Cookies.get('__dnt_co_param'); if (cookie_value) { let params = JSONC.unpack(cookie_value); if (params) { console.log('resuming piano checkout...'); dnt_piano_start_checkout(params, 2500); } } else { console.log('No checkout params available.'); } } function dnt_piano_start_checkout(params, timeout) { if (params) { setTimeout(() => { console.log("start Piano checkout..."); tp.offer.startCheckout(params); }, timeout); Cookies.remove('__dnt_co_param'); } else { console.log("Checkout params could not be found. Aborting checkout."); } } tp.push(["addHandler", "loginRequired", function(params){ checkoutParams = params; console.log("Checkout params: " + JSON.stringify(params)); Cookies.remove('__dnt_co_param'); dnt_piano_open_login(); // this will prevent the Piano error screen from displaying return false; }]); tp.push(["addHandler", "checkoutComplete", function(params){ console.log("checkout completed. refreshing page..."); window.location = 'https://www.onetz.de/user/login'; }]);