Share via


CurrentApp.GetProductReceiptAsync(String) 方法

定義

要求指定產品識別碼的收據。 如需如何使用收據資訊的範例,請參閱 使用收據來驗證產品購買

public:
 static IAsyncOperation<Platform::String ^> ^ GetProductReceiptAsync(Platform::String ^ productId);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<winrt::hstring> GetProductReceiptAsync(winrt::hstring const& productId);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<string> GetProductReceiptAsync(string productId);
function getProductReceiptAsync(productId)
Public Shared Function GetProductReceiptAsync (productId As String) As IAsyncOperation(Of String)

參數

productId
String

Platform::String

winrt::hstring

當您將應用程式提交至 Microsoft Store 時,您指定此識別碼的產品的唯一識別碼

傳回

IAsyncOperation<String>

IAsyncOperation<Platform::String>

IAsyncOperation<winrt::hstring>

包含指定productId之收據的 XML 格式字串。

屬性

備註

如需收據內容的詳細資訊,請參閱 使用收據來驗證產品購買

適用於