StorePreview.RequestProductPurchaseByProductIdAndSkuIdAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
请求购买与当前应用关联的应用内产品的 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.ProductId 和 StorePreviewProductInfo.ProductId 值与 Windows.ApplicationModel.Store.ProductListing.ProductId 值不同。 Windows.ApplicationModel.Store.ProductListing.ProductId 由开发人员在 合作伙伴中心中创建应用内产品时指定。 StorePreviewSkuInfo.ProductId 和 StorePreviewProductInfo.ProductId 值由 Microsoft 生成。