EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

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

Applies to Windows and Windows Phone

[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

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

See also

CurrentApp
RequestProductPurchaseAsync(String)

 

 

Mostrar:
© 2014 Microsoft