Moai SDK
1.5 revision 1 (MoaiEdition)
|
Inherits MOAIGlobalClass< TYPE, SUPER >.
Check to see if the currently selected billing provider is available.
function checkBillingSupported ()
Check to see if the device can get in app billing.
function checkInAppSupported ()
Check to see if the device can get subscription billing.
function checkSubscriptionSupported ()
Confirm a previously received notification. Only applies to the Google Play billing provider.
function confirmNotification ( string notification )
notification | ( string ) The notification ID to confirm. |
Consumes a purchase.
function consumePurchaseSync ( string token )
token | ( string ) |
Gets the user's purchased products.
function getPurchasedProducts ( number type [, string continuation ] )
type | ( number ) |
continuation | ( string ) Optional. |
Get the ID of the current user for the currently selected billing provider. Only applies to the Amazon billing provider.
function getUserId ()
Starts a purchase intent for the desired product.
function purchaseProduct ( string sku, number type [, string devPayload ] )
sku | ( string ) |
type | ( number ) |
devPayload | ( string ) Optional. |
Gets the products from Google Play for the current app.
function requestProductsSync ( table skus, number type )
skus | ( table ) |
type | ( number ) |
Request the purchase of an item.
function requestPurchase ( string sku [, string payload ] )
sku | ( string ) The SKU to purchase. |
payload | ( string ) Optional. The request payload to be returned upon request completion. Default is nil. |
Request the restoration of any previously purchased items.
function restoreTransactions ( [ string offset ] )
offset | ( string ) Optional. The offset in the paginated results to start from. Only applies to the Amazon billing provider. Default is nil. |
Set the billing provider to use for in-app purchases.
function setBillingProvider ( number provider )
provider | ( number ) The billing provider. |
Set the public key to be used for receipt verification. Only applies to the Google Play billing provider.
function setPublicKey ( string key )
key | ( string ) The public key. |