Displays the Kred purchase interface
showKredPurchaseDialog(type)
Displaying the Kred Purchase Dialog
You may bring up the "purchase kreds" dialog box by using the showKredPurchaseDialog
method on the microtransaction services object. The only argument is the default purchase method you would like to display, which can be either offers
to show the OfferPal Kred options, or mobile
to show the mobile payment options. Any other value will simply show the default purchase dialog.
Name | Type | Description |
---|---|---|
type | String | Optional type of offer to display, can be offers or mobile - any other value shows the default dialog |
Example: Display the OfferPal Kred purchase dialog:
kongregate.mtx.showKredPurchaseDialog("offers");
Handling Guest Users
Since guest users on Kongregate are not allowed to purchase items, you must decide how you want to handle them in your game. In general, whenever a guest user wants to purchase an item, it is a good idea to display a message letting them know they must sign in or register before they can purchase, and then display the sign-in lightbox. Further documentation on this process can be found here.