Class CurrentApp
Wrapper class for the Windows Store API CurrentApp class.
Inherited Members
Namespace: UnityEngine.Purchasing.Default
Syntax
public class CurrentApp : ICurrentApp
Properties
LicenseInformation
Read access to the current app's license metadata.
Declaration
public LicenseInformation LicenseInformation { get; }
Property Value
Type | Description |
---|---|
LicenseInformation |
Methods
BuildMockProducts(List<WinProductDescription>)
Dummy function implementing the building of Mock Products.
Declaration
public void BuildMockProducts(List<WinProductDescription> products)
Parameters
Type | Name | Description |
---|---|---|
List<WinProductDescription> | products | The list of product descriptions. |
GetUnfulfilledConsumablesAsync()
Returns a list of purchased consumable in-app products that have not been reported to the Microsoft Store as fulfilled..
Declaration
public IAsyncOperation<IReadOnlyList<UnfulfilledConsumable>> GetUnfulfilledConsumablesAsync()
Returns
Type | Description |
---|---|
IAsyncOperation<IReadOnlyList<UnfulfilledConsumable>> | The list of purchased consumable products that have not been reported as fulfilled. |
LoadListingInformationAsync()
Loads the app's listing information asynchronously. Additionally, the listing information for available in-app products is also provided.
Declaration
public IAsyncOperation<ListingInformation> LoadListingInformationAsync()
Returns
Type | Description |
---|---|
IAsyncOperation<ListingInformation> | The ListingInformation that contains info (ex: name, price) specific to the market the user currently resides in. |
ReportConsumableFulfillmentAsync(String, Guid)
Notifies the Microsoft Store that the purchase of a consumable add-on (also called an in-app product or IAP) is fulfilled and that the user has the right to access the content.
Declaration
public IAsyncOperation<FulfillmentResult> ReportConsumableFulfillmentAsync(string productId, Guid transactionId)
Parameters
Type | Name | Description |
---|---|---|
String | productId | The product ID of the consumable add-on to report as fulfilled. |
Guid | transactionId | The transaction ID for the purchase of the consumable add-on. |
Returns
Type | Description |
---|---|
IAsyncOperation<FulfillmentResult> | An async operation for a |
RequestAppReceiptAsync()
Requests all receipts for the purchase of the app and any in-app products.
Declaration
public IAsyncOperation<string> RequestAppReceiptAsync()
Returns
Type | Description |
---|---|
IAsyncOperation<String> | An async operation for an XML-formatted string containing all receipt information for the purchases of the app and of its products.. |
RequestProductPurchaseAsync(String)
Requests the purchase of an add-on (also called an in-app product or IAP). Additionally, calling this method displays the UI that is used to complete the transaction via the Microsoft Store.
Declaration
public IAsyncOperation<PurchaseResults> RequestProductPurchaseAsync(string productId)
Parameters
Type | Name | Description |
---|---|---|
String | productId | The product ID of the add-on to purchase. |
Returns
Type | Description |
---|---|
IAsyncOperation<PurchaseResults> | An async operation for a |
RequestProductReceiptAsync(String)
Requests the purchase of an add-on (also called an in-app product or IAP). Additionally, calling this method displays the UI that is used to complete the transaction via the Microsoft Store.
Declaration
public IAsyncOperation<string> RequestProductReceiptAsync(string productId)
Parameters
Type | Name | Description |
---|---|---|
String | productId | The product ID of the add-on to purchase. |
Returns
Type | Description |
---|---|
IAsyncOperation<String> | An async operation for a string providing in-app transaction details for the provided productId. |