<script src="https://www.paypal.com/sdk/js?client-id=YOUR_CLIENT_ID"></script><script
defer
src="https://www.paypal.com/sdk/js?client-id=YOUR_CLIENT_ID"
></script><!-- Place on one of your landing pages or pre-checkout pages -->
<body>
<script
src="https://www.paypal.com/sdk/js?client-id=CLIENT_ID" async>
</script>
</body><head>
<script src="https://www.paypal.com/sdk/js?client-id=CLIENT_ID"></script>
</head>var PAYPAL_SCRIPT = 'https://www.paypal.com/sdk/js?client-id=CLIENT_ID';
var script = document.createElement('script');
script.setAttribute('src', PAYPAL_SCRIPT);
document.head.appendChild(script);<div id="paypal-button-container"></div>
<script>
document.querySelector('#myRadioField')
.addEventListener('click', function() {
paypal.Buttons().render('#paypal-button-container')
});
</script><div id="paypal-button-container"></div>
<script>
document.querySelector('#paypal-button-container')
.style.display = 'none';
paypal.Buttons().render('#paypal-button-container');
document.querySelector('#myRadioField')
.addEventListener('click', function() {
document.querySelector('#paypal-button-container')
.style.display = 'block';
});
</script>