![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
The IAppStoreProduct interface.
The IAppStoreProduct object can be created by the IAppStoreControl object.
Enumeration of the product status. Use GetStatus() to get the current status.
Murl.IAppStoreProduct.STATUS_NOT_PURCHASED | The product is not purchased. |
Murl.IAppStoreProduct.STATUS_PURCHASE_PENDING | Purchasing the product is in progress. |
Murl.IAppStoreProduct.STATUS_PURCHASED | The product is purchased. |
Murl.IAppStoreProduct.STATUS_PURCHASE_CANCELLED | Purchasing the product is cancelled. |
Murl.IAppStoreProduct.STATUS_CONSUME_PENDING | Consuming the product is in progress. |
Murl.IAppStoreProduct.STATUS_CONSUMED | The product is consumed. |
Murl.IAppStoreProduct.STATUS_CONSUME_CANCELLED | Consuming the product is cancelled. |
Murl.IAppStoreProduct.STATUS_ERROR | Purchase error. |
Enumeration of the product types.
Murl.IAppStoreProduct.PRODUCT_TYPE_NON_CONSUMABLE | The product is non-consumable. |
Murl.IAppStoreProduct.PRODUCT_TYPE_CONSUMABLE | The product is consumable. |
Murl.IAppStoreProduct.PRODUCT_TYPE_AUTO_RENEWABLE | The product is auto-renewable. |
Get the product purchase status. The purchase operation works asynchronously, the application can check the current status to operate correctly.
Murl.IAppStoreProduct.Status GetStatus()
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()
Check if the product is initialized. The product is initialized when connecting to the app-store was successful.
Boolean IsInitialized()
Check if the product is valid on the app-store.
Boolean IsValid()
Get the identifier of the product.
String GetId()
Get the product type.
Murl.IAppStoreProduct.ProductType GetProductType()
Get the title of the product.
String GetTitle()
Get the description of the product.
String GetDescription()
Get the price of the product.
String GetPrice()
Get the localized price of the product. The localized price description contains the currency symbol and the corresponding currency number format.
String GetLocalPrice()
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()
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()
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()
Get the description string of the last error. Use ClearLastError() to reset the error status.
String GetLastError()
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()