JavaScript for creating dynamic buttons that enable PayPal checkout