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

CurrentApp.RequestAppPurchaseAsync | requestAppPurchaseAsync method

Requests the purchase of a full app license.

Syntax


Windows.ApplicationModel.Store.CurrentApp.requestAppPurchaseAsync(includeReceipt).done( /* Your success and error handlers */ );

Parameters

includeReceipt

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

Determines if this method should return the receipts for this app.

Return value

Type: IAsyncOperation<String>

If the includeReceipt parameter is set to true, this string contains XML that represents all receipts for the app and any in-app purchases. If includeReceipt is set to false, this string is empty.

Remarks

This method returns a success value even if:

  • No network connection is available.
  • The user cancels out of the dialog.
  • The user's authentication fails.
You should treat a success result as indicating the async process completed without errors. To ensure that the transaction itself was successful, check the LicenseInformation element in the returned receipt.

For information about the contents of the receipt returned by this method, see Using receipts to verify product purchases.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

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

See also

CurrentApp

 

 

Mostrar:
© 2017 Microsoft