Skip to main content
CurrentAppSimulator.RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties) | requestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties) method

Applies to Windows and Windows Phone

Creates the async operation that displays the UI that is used to simulate the purchase of an in-app product from the Windows Store.

The resulting RequestProductPurchaseAsync object includes the parameters required to display details for a specific offer within a large catalog of in-app products that is represented by a single entry in the Windows Store.

Syntax


Windows.ApplicationModel.Store.CurrentAppSimulator.requestProductPurchaseAsync(productId, offerId, displayProperties).done( /* Your success and error handlers */ );

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)

public:
static IAsyncOperation<PurchaseResults>^ RequestProductPurchaseAsync(
  String^ productId, 
  String^ offerId, 
  ProductPurchaseDisplayProperties^ displayProperties
)

Parameters

productId

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The product ID used for listing in the Windows Store.

offerId

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

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

displayProperties

Type: ProductPurchaseDisplayProperties

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

Return value

Type: IAsyncOperation<PurchaseResults>

The results of the in-app product purchase.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.ApplicationModel.Store
Windows::ApplicationModel::Store [C++]

Metadata

Windows.winmd

See also

CurrentAppSimulator
RequestProductPurchaseAsync(String)
RequestProductPurchaseAsync(String, Boolean)