Last active
December 13, 2018 16:34
-
-
Save alexanderisora/f81ff41b51724232df60c0d5d8a2235f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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