Type Library Revision 2017.3060 Keywords Google, IAP, in-app purchases Platforms Android
The Google IAP plugin allows you to support
For in-app purchasing on other platforms, see the documentation for Apple IAP or Amazon IAP.
To use Google IAP, begin by setting up your Google Payments Merchant Center account and linking it to the Google Play Developer Console.
Additional configuration must occur within the Google Play Developer Console. If you need assistance with this process, please see Google's documentation.
local store = require( "plugin.google.iap.v3" )
To use this plugin, add an entry into the plugins
table of build.settings
. When added, the build server will integrate the plugin during the build phase.
settings = { plugins = { ["plugin.google.iap.v3"] = { publisherId = "com.coronalabs" }, }, }
In addition, you must enable the BILLING
permission in build.settings
:
settings = { android = { usesPermissions = { "com.android.vending.BILLING", }, }, }
Finally, the license
table must be added to the project config.lua
file. Inside this table, the key
value should be set to the corresponding key obtained from the Google Play Developer Console.
application = { license = { google = { key = "YOUR_KEY", }, }, }