CurrentAppSimulator.RequestProductPurchaseAsync CurrentAppSimulator.RequestProductPurchaseAsync CurrentAppSimulator.RequestProductPurchaseAsync CurrentAppSimulator.RequestProductPurchaseAsync CurrentAppSimulator.RequestProductPurchaseAsync Method

Definition

Overloads

RequestProductPurchaseAsync(String) RequestProductPurchaseAsync(String) RequestProductPurchaseAsync(String) RequestProductPurchaseAsync(String) RequestProductPurchaseAsync(String)

Creates the async operation that displays the UI that is used to simulate the purchase of an add-on (also called an in-app product or IAP) from the Microsoft Store.

RequestProductPurchaseAsync(String, Boolean) RequestProductPurchaseAsync(String, Boolean) RequestProductPurchaseAsync(String, Boolean) RequestProductPurchaseAsync(String, Boolean) RequestProductPurchaseAsync(String, Boolean)

Note

RequestProductPurchaseAsync(String, Boolean) may be altered or unavailable for releases after Windows 8.1. Instead, use RequestProductPurchaseAsync(String).

Creates the async operation that displays the UI that is used to simulate the purchase of an add-on (also called an in-app product or IAP) from the Microsoft Store.

RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties) RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties) RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties) RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties) RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties)

Creates the async operation that displays the UI that is used to simulate the purchase of an add-on (also called an in-app product or IAP) from the Microsoft Store. This overload includes parameters you can use to display details for a specific offer within a large catalog of in-app purchases that is represented by a single product entry in the Store.

RequestProductPurchaseAsync(String) RequestProductPurchaseAsync(String) RequestProductPurchaseAsync(String) RequestProductPurchaseAsync(String) RequestProductPurchaseAsync(String)

Creates the async operation that displays the UI that is used to simulate the purchase of an add-on (also called an in-app product or IAP) from the Microsoft Store.

public : static IAsyncOperation<PurchaseResults> RequestProductPurchaseAsync(Platform::String productId)
static IAsyncOperation<PurchaseResults> RequestProductPurchaseAsync(winrt::hstring productId) const;
public static IAsyncOperation<PurchaseResults> RequestProductPurchaseAsync(String productId)
Public Shared Function RequestProductPurchaseAsync(productId As String) As IAsyncOperation(Of PurchaseResults)
Windows.ApplicationModel.Store.CurrentAppSimulator.requestProductPurchaseAsync(productId).done( /* Your success and error handlers */ );
Parameters
productId
String String String

The product ID (as defined by the simulation) of the add-on to purchase.

Returns

A PurchaseResults that contains the results of the simulated in-app product purchase request.

Remarks

Uses the CurrentApp/ListingInformation/Product element in the WindowsStoreProxy.xml file with the ProductId attribute that matches ProductId as the data source for the members of the returned object. If the purchase succeeds, the license state is updated only in memory. The contents of WindowsStoreProxy.xml are not changed. For more information, see Using the WindowsStoreProxy.xml file with CurrentAppSimulator.

You can see an example of how to use this method in our code sample.

See Also

RequestProductPurchaseAsync(String, Boolean) RequestProductPurchaseAsync(String, Boolean) RequestProductPurchaseAsync(String, Boolean) RequestProductPurchaseAsync(String, Boolean) RequestProductPurchaseAsync(String, Boolean)

Note

RequestProductPurchaseAsync(String, Boolean) may be altered or unavailable for releases after Windows 8.1. Instead, use RequestProductPurchaseAsync(String).

Creates the async operation that displays the UI that is used to simulate the purchase of an add-on (also called an in-app product or IAP) from the Microsoft Store.

public : static IAsyncOperation<Platform::String> RequestProductPurchaseAsync(Platform::String productId, bool includeReceipt)
static IAsyncOperation<winrt::hstring> RequestProductPurchaseAsync(winrt::hstring productId, bool includeReceipt) const;
public static IAsyncOperation<string> RequestProductPurchaseAsync(String productId, Boolean includeReceipt)
Public Shared Function RequestProductPurchaseAsync(productId As String, includeReceipt As Boolean) As IAsyncOperation(Of string)
Windows.ApplicationModel.Store.CurrentAppSimulator.requestProductPurchaseAsync(productId, includeReceipt).done( /* Your success and error handlers */ );
Parameters
productId
String String String

The product ID (as defined by the simulation) of the add-on to purchase.

includeReceipt
Boolean Boolean Boolean

Determines if the method should return the receipts for the specified productId.

Returns

A string providing in-app product purchase details for the provided productId. If includeReceipt is set true, the returned string will include a full receipt xml.

Remarks

The remarks for RequestProductPurchaseAsync(String) also apply to this overload.

To confirm whether the product license is active after a successful call to this overload, use the LicenseInformation.IsActive property.

You can see an example of how to use this method in our code sample.

See Also

RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties) RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties) RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties) RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties) RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties)

Creates the async operation that displays the UI that is used to simulate the purchase of an add-on (also called an in-app product or IAP) from the Microsoft Store. This overload includes parameters you can use to display details for a specific offer within a large catalog of in-app purchases that is represented by a single product entry in the Store.

public : static IAsyncOperation<PurchaseResults> RequestProductPurchaseAsync(Platform::String productId, Platform::String offerId, ProductPurchaseDisplayProperties displayProperties)
static IAsyncOperation<PurchaseResults> RequestProductPurchaseAsync(winrt::hstring productId, winrt::hstring offerId, ProductPurchaseDisplayProperties displayProperties) const;
public static IAsyncOperation<PurchaseResults> RequestProductPurchaseAsync(String productId, String offerId, ProductPurchaseDisplayProperties displayProperties)
Public Shared Function RequestProductPurchaseAsync(productId As String, offerId As String, displayProperties As ProductPurchaseDisplayProperties) As IAsyncOperation(Of PurchaseResults)
Windows.ApplicationModel.Store.CurrentAppSimulator.requestProductPurchaseAsync(productId, offerId, displayProperties).done( /* Your success and error handlers */ );
Parameters
productId
String String String

The product ID (as defined by the simulation) of the add-on to purchase.

offerId
String String String

The specific in-app product within the large purchase catalog represented on the Microsoft Store by the productId. This value correlates with the content your app is responsible for fulfilling. The Microsoft Store only uses this parameter value to itemize the PurchaseResults.

displayProperties
ProductPurchaseDisplayProperties ProductPurchaseDisplayProperties ProductPurchaseDisplayProperties

The name of the in-app product that is displayed to the user at time of purchase.

Returns

A PurchaseResults that contains the results of the simulated in-app product purchase request.

Remarks

The remarks for RequestProductPurchaseAsync(String) also apply to this overload.

See Also