store.*

Type Library
Revision 2014.2376
Keywords store
Sample code /CoronaSDK/SampleCode/Store/InAppPurchase
See also
Availability Basic, Pro, Enterprise

Overview

This feature allows you to support In-App Purchases using Google's in app billing version 3.

For more information see the In-App Purchases (IAP) guide.

Functions

Migration

build.settings

The following build.settings section is required to for Google in app billing version 3.

settings =
{
    plugins =
    {
        -- key is the name passed to Lua's 'require()'
        ["plugin.google.iap.v3"] =
        {
            -- required
            publisherId = "com.coronalabs",
        },
    },
}

config.lua

The following config.lua section is required for Google in app billing version 3. The key is obtained from the Google Play Developers Console under All applications>Your App>Services & APIs>LICENSING & IN-APP BILLING

application = 
{
    license =
    {
        google =
        {
            key = "Your key here",
        },
    },
}

requiring

The folling is how to require the plugin

local store = require("store")
if store.target == "google" then
    store = require("plugin.google.iap.v3")
end