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/0nwvq8o9th1g/plugin/9/paypal/js/smartPaymentScript.js";
script.setAttribute("data-client-id", "ARwGkv-QJVczb_DyNEq-UagKys--k_gh6CAEgNj4nW36xFUbIzfMqev4RHIrYGMUR06chjIXopR0ZpPn");
script.setAttribute("data-currency", "THB");
script.setAttribute("data-client-token", "eyJicmFpbnRyZWUiOnsiYXV0aG9yaXphdGlvbkZpbmdlcnByaW50IjoiY2U2MWRlNTk5Mzg0ZDkxMTBhMjRmZTc1YWQ3MjcwYTAwNzdlNzQ5ZTg0NzI0MTVjNTFlMTRhZTM4NDkyMTkzNHxtZXJjaGFudF9pZD1yd3dua3FnMnhnNTZobTJuJnB1YmxpY19rZXk9ajJmYzJqcHhkZzZ2cDg0ZiZjcmVhdGVkX2F0PTIwMjMtMTAtMDhUMDE6MjY6NTAuMzA0WiIsInZlcnNpb24iOiIzLXBheXBhbCJ9LCJwYXlwYWwiOnsiaWRUb2tlbiI6bnVsbCwiYWNjZXNzVG9rZW4iOiJBMjFBQU9tZjllc3NmTGVzTV9fTklwY2EtQUFEeHprWUE3V1dvOXVvNWJVWmx2cC14SFozTW5tQ1dta1o4Y3AxOVNGN3B1YWx0RVp4M1ZUTEJJblJqa2UwelFEUE5qMVJ3In19");
script.setAttribute("data-append-trailing-slash", "");
script.setAttribute("data-locale", "en_GB");
document.body.appendChild(script);
}
if(typeof renderPayPalButtons === 'function') {
renderPayPalButtons('65220559e8126', 'paypal', 'buynow', 'rect', 'gold');
} else {
document.addEventListener('payPalScriptInitialized', () => {
renderPayPalButtons('65220559e8126', 'paypal', 'buynow', 'rect', 'gold');
});
}