IAP Badger

A simple, unified, IAP library for Corona SDK


Type function
Library iap_badger.*
Return value String.
Keywords target, store
See also


Returns the name of the target store for the current device, as returned by the default Corona libraries.

Note: on the simulator, this will always return the string 'simulator'.




--Include the plugin
local iap = require 'plugin.iap_badger'

--Create the product catalogue
local catalogue = {

    --Information about the product on the app stores
    products = { 

        --buy50coins is the product identifier.
        --Always use this identifier to talk to IAP Badger about the purchase.
        buy50coins = {
                --A list of product names or identifiers specific to apple's App Store or Google Play.
                productNames = { apple="buy50coins", google="50_coins", amazon="COINSx50"},
                --The product type
                productType = "consumable",



    --Information about how to handle the inventory item
    inventoryItems = {
        coins = { productType="consumable" },

--This table contains all of the options we need to specify in this example program.
local iapOptions = {
    --The catalogue generated above
    --The filename in which to save the inventory

--Initialise IAP badger

--Print the name of the store relevant to the current device
print (iap.getTargetStore())

This website uses cookies. Click here to see our privacy policy. Created using the Responsive Grid System.