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/a392fx7fx160/plugin/5/paypal/js/smartPaymentScript.js";
script.setAttribute("data-client-id", "AYxz1-FgJZfJDmp2zZHt197MZ_6O0b5baY3qsWIoIiQrnQ1xrZM2NCkS5SjeaHCAQ9hl2_Sp2aOwnYEc");
script.setAttribute("data-currency", "THB");
script.setAttribute("data-client-token", "eyJicmFpbnRyZWUiOnsiYXV0aG9yaXphdGlvbkZpbmdlcnByaW50IjoiOGEyMmNlMjVjYmE1ZWViODdiNjhlYzRiOTI0OTdhNGRjOWVhYTQ5YmM5Zjc4OWVjYjM1YWE4MGU3MjQ1N2VmNnxtZXJjaGFudF9pZD1yd3dua3FnMnhnNTZobTJuJnB1YmxpY19rZXk9ajJmYzJqcHhkZzZ2cDg0ZiZjcmVhdGVkX2F0PTIwMjMtMTEtMTZUMjA6MTU6NTAuMDEyWiIsInZlcnNpb24iOiIzLXBheXBhbCJ9LCJwYXlwYWwiOnsiaWRUb2tlbiI6bnVsbCwiYWNjZXNzVG9rZW4iOiJBMjFBQU5sSlpWZnBLSjJWcWlvRXJfRTY5RWd2SlpFQjVyUFd2MFpETnpCdlF2NFhQNFFzWWZyUXU0U2Fia2NfRnB5dUlrVURGSl9JeWNuVEUwbHo5MndyTXpHWTY5VTdnIn19");
script.setAttribute("data-append-trailing-slash", "");
script.setAttribute("data-locale", "en_GB");
document.body.appendChild(script);
}
if(typeof renderPayPalButtons === 'function') {
renderPayPalButtons('65567a1607eba', 'paypal', 'buynow', 'pill', 'gold');
} else {
document.addEventListener('payPalScriptInitialized', () => {
renderPayPalButtons('65567a1607eba', 'paypal', 'buynow', 'pill', 'gold');
});
}