SpilGames PayVault Provider
Setting up your SpilGames account
- Talk to the SpilGames Payments Team to set up a new game. You should have gotten a game id, and a secret key.
- You need to provide them a callback url. Check your PayVault configuration page to get the callback url for your game.
Configuring SpilGames on PlayerIO
- Enable SpilGames in the PayVault Control Panel for your game.
- Enter the secret key into the "SpilGames Secret" field. You should have gotten this value from the SpilGames Payments Team.
To use SpilGames payments in your game, you need to host it in an HTML page where the SpilGames JS API library has been loaded. You need to set up a JS function that can be called from your game and passed some parameters.
If you're using SiteBox to host your game, here's a barebones example using the staging environment:
Buying Coins: GetBuyCoinsInfo()
Example of buying coins with SpilGames in ActionScript 3:
|Required GetBuyCoinsInfo() Arguments|
|siteId||The id of the site your game is published on. You can get this value from the SpilGames Payments Team.|
|userId||The id of the user making the purchase. You can read this from the containing page using the SpilGames JS api.|
|Optional GetBuyCoinsInfo() Arguments|
|urlSuccess||Which URL the browser should redirect to after a successful purchase.|
|urlFailure||Which URL the browser should redirect to after a failed purchase.|
|urlCancel||Which URL the browser should redirect to after a cancelled purchase.|
|Pass the entire result object into the showPaymentSelectionScreen() method.|