CurrentAppSimulator.RequestAppPurchaseAsync(Boolean) CurrentAppSimulator.RequestAppPurchaseAsync(Boolean) CurrentAppSimulator.RequestAppPurchaseAsync(Boolean) CurrentAppSimulator.RequestAppPurchaseAsync(Boolean) CurrentAppSimulator.RequestAppPurchaseAsync(Boolean) Method

Definition

Creates the async operation that simulates a user request to buy a full license for the current app.

public : static IAsyncOperation<Platform::String> RequestAppPurchaseAsync(bool includeReceipt)
static IAsyncOperation<winrt::hstring> RequestAppPurchaseAsync(bool includeReceipt) const;
public static IAsyncOperation<string> RequestAppPurchaseAsync(Boolean includeReceipt)
Public Shared Function RequestAppPurchaseAsync(includeReceipt As Boolean) As IAsyncOperation(Of string)
Windows.ApplicationModel.Store.CurrentAppSimulator.requestAppPurchaseAsync(includeReceipt).done( /* Your success and error handlers */ );

Parameters

includeReceipt
Boolean Boolean Boolean

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

Returns

If the includeReceipt parameter is set to true, this string contains XML that represents all receipts for the app and any in-app product 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 more information about the contents of the receipt, see Using receipts to verify product purchases.