if(!document.getElementById('paypal-smart-payment-script'))
{
var script = document.createElement("script");
script.type = "module";
script.id = "paypal-smart-payment-script";
script.src = "https://cdn02.plentyone.com/nczo35edtdy8/plugin/18/paypal/js/smartPaymentScript.min.js";
script.setAttribute("data-client-id", "AfslQana4f4CQjHvRBnUc6vBJg5jgJuZFwM-SbrTiGKUAqB7MrxQv3QWFdQ6U1h7ogMDokT1DNBzRxMw");
script.setAttribute("data-user-id-token", "");
script.setAttribute("data-merchant-id", "9N5T8ML5ESM3J");
script.setAttribute("data-currency", "EUR");
script.setAttribute("data-append-trailing-slash", "true");
script.setAttribute("data-locale", "it_IT");
script.setAttribute("sandbox", "");
script.setAttribute("googlePayComponent", 1);
script.setAttribute("applePayComponent", 1);
script.setAttribute("logToken", "75755a6cffc0be11d7c520294c1fafad");
document.body.appendChild(script);
} else {
var script = document.getElementById('paypal-smart-payment-script');
script.src = "https://cdn02.plentyone.com/nczo35edtdy8/plugin/18/paypal/js/smartPaymentScript.min.js";
script.setAttribute("data-client-id", "AfslQana4f4CQjHvRBnUc6vBJg5jgJuZFwM-SbrTiGKUAqB7MrxQv3QWFdQ6U1h7ogMDokT1DNBzRxMw");
script.setAttribute("data-user-id-token", "");
script.setAttribute("data-merchant-id", "9N5T8ML5ESM3J");
script.setAttribute("data-currency", "EUR");
script.setAttribute("data-append-trailing-slash", "true");
script.setAttribute("data-locale", "it_IT");
script.setAttribute("sandbox", "");
script.setAttribute("googlePayComponent", 1);
script.setAttribute("applePayComponent", 1);
script.setAttribute("logToken", "75755a6cffc0be11d7c520294c1fafad");
}
if (typeof paypal_plenty_sdk === 'undefined' || typeof renderPayPalButtons !== 'function') {
document.addEventListener('payPalScriptInitialized', () => {
renderPayPalButtons('6a99ae4229eab', 'paylater', 'paypal', 'rect', 'gold');
});
} else {
renderPayPalButtons('6a99ae4229eab', 'paylater', 'paypal', 'rect', 'gold');
}