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.plentymarkets.com/y556ywtxgskt/plugin/1/paypal/js/smartPaymentScript.js";
script.setAttribute("data-client-id", "AeJY7KE4TjICwK4tJGp2G6kQMow2BkJMXLPp_L3Drr6JBC8gQgrHeZA55gWwio8gzR3y0uKD0j2rdMwK");
script.setAttribute("data-currency", "THB");
script.setAttribute("data-client-token", "eyJicmFpbnRyZWUiOnsiYXV0aG9yaXphdGlvbkZpbmdlcnByaW50IjoiZTJkMmU0M2M2MmVkZWIxY2IwZDU4NjEzZjY2ODYyZWE0ODVjMjBiNDQ3MzBlYzlmMzcxM2NlMGRmZjM4NjIxZHxtZXJjaGFudF9pZD1yd3dua3FnMnhnNTZobTJuJnB1YmxpY19rZXk9ajJmYzJqcHhkZzZ2cDg0ZiZjcmVhdGVkX2F0PTIwMjUtMDgtMTdUMDQ6NDg6NTAuMjY1NDk0MDYwWiIsInZlcnNpb24iOiIzLXBheXBhbCJ9LCJwYXlwYWwiOnsiaWRUb2tlbiI6bnVsbCwiYWNjZXNzVG9rZW4iOiJBMjFBQU12N1V4a3VLVDI1Tk9TMEUyQ2F4TjNOWFZyODMxb1RhNVhvQm1PellDRlA3WTZMeW9ra1hhRjljVm1wM3RsQmVJbXFZT1huWTgtVGtWYnNwRk5DSWV3NXlXYUNBIn19");
script.setAttribute("data-append-trailing-slash", "");
script.setAttribute("data-locale", "de_DE");
document.body.appendChild(script);
} else {
var script = document.getElementById('paypal-smart-payment-script');
script.setAttribute("data-client-id", "AeJY7KE4TjICwK4tJGp2G6kQMow2BkJMXLPp_L3Drr6JBC8gQgrHeZA55gWwio8gzR3y0uKD0j2rdMwK");
script.setAttribute("data-currency", "THB");
script.setAttribute("data-client-token", "eyJicmFpbnRyZWUiOnsiYXV0aG9yaXphdGlvbkZpbmdlcnByaW50IjoiZTJkMmU0M2M2MmVkZWIxY2IwZDU4NjEzZjY2ODYyZWE0ODVjMjBiNDQ3MzBlYzlmMzcxM2NlMGRmZjM4NjIxZHxtZXJjaGFudF9pZD1yd3dua3FnMnhnNTZobTJuJnB1YmxpY19rZXk9ajJmYzJqcHhkZzZ2cDg0ZiZjcmVhdGVkX2F0PTIwMjUtMDgtMTdUMDQ6NDg6NTAuMjY1NDk0MDYwWiIsInZlcnNpb24iOiIzLXBheXBhbCJ9LCJwYXlwYWwiOnsiaWRUb2tlbiI6bnVsbCwiYWNjZXNzVG9rZW4iOiJBMjFBQU12N1V4a3VLVDI1Tk9TMEUyQ2F4TjNOWFZyODMxb1RhNVhvQm1PellDRlA3WTZMeW9ra1hhRjljVm1wM3RsQmVJbXFZT1huWTgtVGtWYnNwRk5DSWV3NXlXYUNBIn19");
script.setAttribute("data-append-trailing-slash", "");
script.setAttribute("data-locale", "de_DE");
}
if(typeof renderPayPalButtons === 'function') {
renderPayPalButtons('68a16b4e5dad4', 'paylater', 'paypal', 'rect', 'gold');
} else {
document.addEventListener('payPalScriptInitialized', () => {
renderPayPalButtons('68a16b4e5dad4', 'paylater', 'paypal', 'rect', 'gold');
});
}
if(typeof renderPayPalButtons === 'function') {
renderPayPalButtons('68a16b4e5dad4', 'paypal', 'buynow', 'rect', 'gold');
} else {
document.addEventListener('payPalScriptInitialized', () => {
renderPayPalButtons('68a16b4e5dad4', 'paypal', 'buynow', 'rect', 'gold');
});
}