-api-id | -api-type |
---|---|
M:Windows.ApplicationModel.Store.CurrentAppSimulator.RequestProductPurchaseAsync(System.String) |
winrt method |
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.
The product ID (as defined by the simulation) of the add-on to purchase.
A PurchaseResults that contains the results of the simulated in-app product purchase request.
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.