StorePreview.RequestProductPurchaseByProductIdAndSkuIdAsync メソッド

定義

現在のアプリに関連付けられているアプリ内製品の SKU の購入を要求します。 このメソッドを呼び出すと、Microsoft Store 経由でトランザクションを完了するために使用される UI が表示されます。

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

パラメーター

productId
String

Platform::String

winrt::hstring

アプリ内製品の ID を指定します。 これは、アプリ内製品のすべての SKU の StorePreviewProductInfo.ProductId 値と StorePreviewSkuInfo.ProductId 値に対応します。

skuId
String

Platform::String

winrt::hstring

アプリ内製品の SKU の ID を指定します。 これは 、StorePreviewSkuInfo.SkuId 値に対応します。

戻り値

正常に完了すると、アプリ内製品購入要求の結果を含む StorePreviewPurchaseResults を 返す非同期操作。

属性

Windows の要件

アプリの機能
previewStore

注釈

StorePreviewSkuInfo.ProductIdStorePreviewProductInfo.ProductId の値は、Windows.ApplicationModel.Store.ProductListing.ProductId 値と同じではありません。 Windows.ApplicationModel.Store.ProductListing.ProductId は、 パートナー センターでアプリ内製品を作成する際に開発者によって指定されます。 StorePreviewSkuInfo.ProductIdStorePreviewProductInfo.ProductId の値は、Microsoft によって生成されます。

適用対象

こちらもご覧ください