PlayerIO

The fastest way to build online games without breaking a sweat.

HTML5 (Javascript) Client Reference

javascript (html5) publishingNetworkPayments class informationClass publishingNetworkPayments

Language: Javascript (HTML5)

The PlayerIO Publishing Network Payments service. This class is used to initiate in-game payments for games that are published on the PlayerIO Publishing Network.

Example

Showing a buy coins dialog

Example

Showing a buy items dialog

Methods

 
showBuyCoinsDialog (coinAmount, purchaseArguments, successCallback, errorCallback):

Shows a dialog for buying coins

showBuyItemsDialog (items, purchaseArguments, successCallback, errorCallback):

Shows a dialog for buying items

publishingNetworkPayments.showBuyCoinsDialog

showBuyCoinsDialog (coinAmount, purchaseArguments, successCallback, errorCallback):

Shows a dialog for buying coins

Arguments

coinAmount:int
The amount of coins to buy
purchaseArguments:object
Any additional information that is needed to show the payment dialog
successCallback:function(result)
Callback function that will be called with the result
errorCallback:function(PlayerIOError)
Callback function that will be called if an error occurs.

publishingNetworkPayments.showBuyItemsDialog

showBuyItemsDialog (items, purchaseArguments, successCallback, errorCallback):

Shows a dialog for buying items

Arguments

items:object[]
A list of items to buy, together with any additional payload.
purchaseArguments:object
Any additional information that is needed to show the payment dialog
successCallback:function(result)
Callback function that will be called with the result
errorCallback:function(PlayerIOError)
Callback function that will be called if an error occurs.