![]() |
Murl Engine API
Version 2018.3
|
The IAppStoreProduct interface. More...
#include <murl_i_app_store_product.h>
The IAppStoreProduct interface.
The IAppStoreProduct object can be created by the IAppStoreControl object.
Inherited by Murl::Platform::AppStoreProduct.
Public Types | |
enum | Status { STATUS_NOT_PURCHASED, STATUS_PURCHASE_PENDING, STATUS_PURCHASED, STATUS_PURCHASE_CANCELLED, STATUS_CONSUME_PENDING, STATUS_CONSUMED, STATUS_CONSUME_CANCELLED, STATUS_ERROR } |
Enumeration of the product status. More... | |
enum | ProductType { PRODUCT_TYPE_NON_CONSUMABLE, PRODUCT_TYPE_CONSUMABLE, PRODUCT_TYPE_AUTO_RENEWABLE } |
Enumeration of the product types. More... | |
Public Member Functions | |
virtual Status | GetStatus () const =0 |
Get the product purchase status. More... | |
virtual Bool | ClearStatus ()=0 |
Clear the product purchase status. More... | |
virtual Bool | IsInitialized () const =0 |
Check if the product is initialized. More... | |
virtual Bool | IsValid () const =0 |
Check if the product is valid on the app-store. More... | |
virtual const String & | GetId () const =0 |
Get the identifier of the product. More... | |
virtual ProductType | GetProductType () const =0 |
Get the product type. More... | |
virtual const String & | GetTitle () const =0 |
Get the title of the product. More... | |
virtual const String & | GetDescription () const =0 |
Get the description of the product. More... | |
virtual const String & | GetPrice () const =0 |
Get the price of the product. More... | |
virtual const String & | GetLocalPrice () const =0 |
Get the localized price of the product. More... | |
virtual const String & | GetCurrencyCode () const =0 |
Get the international currency symbol. More... | |
virtual const Data & | GetReceiptData () const =0 |
Get the product receipt data. More... | |
virtual const Data & | GetReceiptSignature () const =0 |
Get the product receipt signature data. More... | |
virtual const String & | GetLastError () const =0 |
Get the description string of the last error. More... | |
virtual Bool | ClearLastError ()=0 |
Clear the last error status and string. More... | |
Enumeration of the product status.
Use GetStatus() to get the current status.
|
pure virtual |
Get the product purchase status.
The purchase operation works asynchronously, the application can check the current status to operate correctly.
|
pure virtual |
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.
|
pure virtual |
Check if the product is initialized.
The product is initialized when connecting to the app-store was successful.
|
pure virtual |
Check if the product is valid on the app-store.
|
pure virtual |
Get the identifier of the product.
|
pure virtual |
Get the product type.
|
pure virtual |
Get the title of the product.
|
pure virtual |
Get the description of the product.
|
pure virtual |
Get the price of the product.
|
pure virtual |
Get the localized price of the product.
The localized price description contains the currency symbol and the corresponding currency number format.
|
pure virtual |
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.
|
pure virtual |
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.
|
pure virtual |
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.
|
pure virtual |
Get the description string of the last error.
Use ClearLastError() to reset the error status.
|
pure virtual |
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.