In App Billing Interface

Status: Beta

Version: 0.65

Forum thread

What's new?

version 0.65
Updated GoogleBilling Helper lib
Implemented GoogleBilling support for 20+ products
Fixed queryInverntory null pointer exception

About In App Billing Interface

The idea is to provide common In App Billing interface for most of available iap frameworks, so users could use in app purchases across platforms and iap frameworks with completely same or similar interface.

Currently implemented interfaces are:
Ouya
GoogleBilling v3
Amazon IAP

Installation

Android
Copy libs folder into your exported project
Copy src folder into your exported project
Add System.loadLibrary("iab"); to your main activity
Add "com.giderosmobile.android.plugins.iab.Iab" as external class in your main activity

Code example:

local test = IAB.new("test")

test:addEventListener(Event.AVAILABLE, function(e)
	--provide setup stuff (framework specific)
	test:setUp("value1", "value2", "value3")
	test:purchase("product1") --purchase something
end)

test:addEventListener(Event.PURCHASE_COMPLETE, function(e)
	--unlock your purchase here
	print(e.productId, e.receiptId)
	test:confirm(e.productId)
end)

test:isAvailable()
test:restore()