Murl Engine Lua Addon API  Version 1.0 beta
Murl.IAppStoreProduct

The IAppStoreProduct interface.

The IAppStoreProduct object can be created by the IAppStoreControl object.


Table members

Enumerations


Status

Enumeration of the product status. Use GetStatus() to get the current status.

Murl.IAppStoreProduct.STATUS_NOT_PURCHASEDThe product is not purchased.
Murl.IAppStoreProduct.STATUS_PURCHASE_PENDINGPurchasing the product is in progress.
Murl.IAppStoreProduct.STATUS_PURCHASEDThe product is purchased.
Murl.IAppStoreProduct.STATUS_PURCHASE_CANCELLEDPurchasing the product is cancelled.
Murl.IAppStoreProduct.STATUS_CONSUME_PENDINGConsuming the product is in progress.
Murl.IAppStoreProduct.STATUS_CONSUMEDThe product is consumed.
Murl.IAppStoreProduct.STATUS_CONSUME_CANCELLEDConsuming the product is cancelled.
Murl.IAppStoreProduct.STATUS_ERRORPurchase error.

ProductType

Enumeration of the product types.

Murl.IAppStoreProduct.PRODUCT_TYPE_NON_CONSUMABLEThe product is non-consumable.
Murl.IAppStoreProduct.PRODUCT_TYPE_CONSUMABLEThe product is consumable.
Murl.IAppStoreProduct.PRODUCT_TYPE_AUTO_RENEWABLEThe product is auto-renewable.


Functions



Methods


GetStatus()

Get the product purchase status. The purchase operation works asynchronously, the application can check the current status to operate correctly.

Murl.IAppStoreProduct.Status GetStatus()

Returns
Murl.IAppStoreProduct.Status The product purchase status.

ClearStatus()

Clear the product purchase status. Set the product purchase status to IAppStoreProduct::STATUS_NOT_PURCHASED if the product purchase status is IAppStoreProduct::STATUS_PURCHASE_CANCELLED.
Set the product purchase status to IAppStoreProduct::STATUS_PURCHASED if the product purchase status is IAppStoreProduct::STATUS_CONSUME_CANCELLED.

Boolean ClearStatus()

Returns
Boolean true if successful.

IsInitialized()

Check if the product is initialized. The product is initialized when connecting to the app-store was successful.

Boolean IsInitialized()

Returns
Boolean true if the product is initialized.

IsValid()

Check if the product is valid on the app-store.

Boolean IsValid()

Returns
Boolean true if the product is valid on the app-store.

GetId()

Get the identifier of the product.

String GetId()

Returns
String The identifier of the product.

GetProductType()

Get the product type.

Murl.IAppStoreProduct.ProductType GetProductType()

Returns
Murl.IAppStoreProduct.ProductType The product type.

GetTitle()

Get the title of the product.

String GetTitle()

Returns
String The product title.

GetDescription()

Get the description of the product.

String GetDescription()

Returns
String The product description.

GetPrice()

Get the price of the product.

String GetPrice()

Returns
String The product price.

GetLocalPrice()

Get the localized price of the product. The localized price description contains the currency symbol and the corresponding currency number format.

String GetLocalPrice()

Returns
String The localized product price.

GetCurrencyCode()

Get the international currency symbol. A country typically has a local currency symbol and an international currency symbol.
The local symbol is used within the country, while the international currency symbol is used in international contexts to specify that country’s currency unambiguously.

String GetCurrencyCode()

Returns
String The international currency symbol.

GetReceiptData()

Get the product receipt data. The purchase receipt data is valid after a successful purchase only.
On iOS the data contains the transactionReceipt from SKPaymentTransaction. On Google Play the data contains the entire RESPONSE_INAPP_PURCHASE_DATA json string. On Amazon & Samsung store the data contains the order identifier. On OSX the data is empty.

Murl.Data GetReceiptData()

Returns
Murl.Data The product receipt data.

GetReceiptSignature()

Get the product receipt signature data. The receipt signature data is valid after a successful purchase only.
On Google Play the data contains the RESPONSE_INAPP_SIGNATURE. On iOS & OSX the data contains the transactionIdentifier from SKPaymentTransaction. On Amazon & Samsung store the data is empty.

Murl.Data GetReceiptSignature()

Returns
Murl.Data The product receipt signature data.

GetLastError()

Get the description string of the last error. Use ClearLastError() to reset the error status.

String GetLastError()

Returns
String The description string of the last error.

ClearLastError()

Clear the last error status and string. Set the product purchase status to IAppStoreProduct::STATUS_NOT_PURCHASED if the product purchase status is IAppStoreProduct::STATUS_ERROR.
Clear the last error string.

Boolean ClearLastError()

Returns
Boolean true if successful.