Windows Dev Center

CurrentApp.RequestProductPurchaseAsync(String, Boolean) | requestProductPurchaseAsync(String, Boolean) method

[RequestProductPurchaseAsync(productId, includeReceipt) may be altered or unavailable for releases after Windows 8.1. Instead, use RequestProductPurchaseAsync(productId).]

Requests the purchase of an in-app product. Additionally, calling this method displays the UI that is used to complete the transaction via the Windows Store.

Syntax


public static IAsyncOperation<string> RequestProductPurchaseAsync(
  string productId, 
  bool includeReceipt
)

Parameters

productId

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

Specifies the id of the in-app product.

includeReceipt

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

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

Return value

Type: IAsyncOperation<String>

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

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

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

Metadata

Windows.winmd

Attributes

[Deprecated()]

See also

CurrentApp
RequestProductPurchaseAsync(String)

 

 

Show:
© 2015 Microsoft