Skip to content

Instantly share code, notes, and snippets.

@alexanderisora
Last active December 13, 2018 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexanderisora/f81ff41b51724232df60c0d5d8a2235f to your computer and use it in GitHub Desktop.
Save alexanderisora/f81ff41b51724232df60c0d5d8a2235f to your computer and use it in GitHub Desktop.
initPaddle(){
//Init the Paddle after it's loaded from their server.
//There is no callback or an event so we use intervals to wait until it's loaded.
//We also must load their script from their servers to get the freshest code.
let interval = setInterval(() => {
if (typeof window.Paddle !== 'undefined') {
//Credentials: https://vendors.paddle.com/account
window.Paddle.Setup({
vendor: 11111,
debug: false
});
clearInterval(interval);
}
}, 500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment