Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 1.68 KB

currentappsimulator_requestproductpurchaseasync_2091240017.md

File metadata and controls

30 lines (21 loc) · 1.68 KB
-api-id -api-type
M:Windows.ApplicationModel.Store.CurrentAppSimulator.RequestProductPurchaseAsync(System.String)
winrt method

Windows.ApplicationModel.Store.CurrentAppSimulator.RequestProductPurchaseAsync

-description

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.

-parameters

-param productId

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.

-examples

-see-also

RequestProductPurchaseAsync(String, Boolean)