다음을 통해 공유


CurrentAppSimulator.RequestProductPurchaseAsync 메서드

정의

오버로드

RequestProductPurchaseAsync(String)

Microsoft Store에서 추가 기능(앱에서 바로 구매 제품 또는 IAP라고도 함)의 구매를 시뮬레이션하는 데 사용되는 UI를 표시하는 비동기 작업을 만듭니다.

RequestProductPurchaseAsync(String, Boolean)

참고

[RequestProductPurchaseAsync(String, Boolean)는 Windows 8.1 후 릴리스에 대해 변경되거나 사용할 수 없습니다. 대신 RequestProductPurchaseAsync(String)를 사용합니다.

Microsoft Store에서 추가 기능(앱에서 바로 구매 제품 또는 IAP라고도 함)의 구매를 시뮬레이션하는 데 사용되는 UI를 표시하는 비동기 작업을 만듭니다.

RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties)

Microsoft Store에서 추가 기능(앱에서 바로 구매 제품 또는 IAP라고도 함)의 구매를 시뮬레이션하는 데 사용되는 UI를 표시하는 비동기 작업을 만듭니다. 이 오버로드에는 스토어의 단일 제품 항목으로 표시되는 앱에서 바로 구매의 큰 카탈로그 내에서 특정 제품에 대한 세부 정보를 표시하는 데 사용할 수 있는 매개 변수가 포함됩니다.

RequestProductPurchaseAsync(String)

Microsoft Store에서 추가 기능(앱에서 바로 구매 제품 또는 IAP라고도 함)의 구매를 시뮬레이션하는 데 사용되는 UI를 표시하는 비동기 작업을 만듭니다.

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

매개 변수

productId
String

Platform::String

winrt::hstring

구매할 추가 기능의 제품 ID(시뮬레이션에 정의된 대로)입니다.

반환

시뮬레이션된 앱 내 제품 구매 요청의 결과를 포함하는 PurchaseResults 입니다.

특성

설명

반환된 개체의 멤버에 대한 데이터 원본으로 ProductId와 일치하는 ProductId 특성을 사용하여 WindowsStoreProxy.xml 파일의 CurrentApp/ListingInformation/Product 요소를 사용합니다. 구매에 성공하면 라이선스 상태가 메모리에서만 업데이트됩니다. WindowsStoreProxy.xml의 내용은 변경되지 않습니다. 자세한 내용은 CurrentAppSimulator에서 WindowsStoreProxy.xml 파일 사용을 참조하세요.

코드 샘플에서 이 메서드를 사용하는 방법의 예를 볼 수 있습니다.

추가 정보

적용 대상

RequestProductPurchaseAsync(String, Boolean)

참고

[RequestProductPurchaseAsync(String, Boolean)는 Windows 8.1 후 릴리스에 대해 변경되거나 사용할 수 없습니다. 대신 RequestProductPurchaseAsync(String)를 사용합니다.

Microsoft Store에서 추가 기능(앱에서 바로 구매 제품 또는 IAP라고도 함)의 구매를 시뮬레이션하는 데 사용되는 UI를 표시하는 비동기 작업을 만듭니다.

public:
 static IAsyncOperation<Platform::String ^> ^ RequestProductPurchaseAsync(Platform::String ^ productId, bool includeReceipt);
/// [Windows.Foundation.Metadata.Deprecated("RequestProductPurchaseAsync(productId, includeReceipt) may be altered or unavailable for releases after Windows 8.1. Instead, use RequestProductPurchaseAsync(productId).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Overload("RequestProductPurchaseAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<winrt::hstring> RequestProductPurchaseAsync(winrt::hstring const& productId, bool const& includeReceipt);
/// [Windows.Foundation.Metadata.Overload("RequestProductPurchaseAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Deprecated("RequestProductPurchaseAsync(productId, includeReceipt) may be altered or unavailable for releases after Windows 8.1. Instead, use RequestProductPurchaseAsync(productId).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
 static IAsyncOperation<winrt::hstring> RequestProductPurchaseAsync(winrt::hstring const& productId, bool const& includeReceipt);
[Windows.Foundation.Metadata.Deprecated("RequestProductPurchaseAsync(productId, includeReceipt) may be altered or unavailable for releases after Windows 8.1. Instead, use RequestProductPurchaseAsync(productId).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Overload("RequestProductPurchaseAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<string> RequestProductPurchaseAsync(string productId, bool includeReceipt);
[Windows.Foundation.Metadata.Overload("RequestProductPurchaseAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Deprecated("RequestProductPurchaseAsync(productId, includeReceipt) may be altered or unavailable for releases after Windows 8.1. Instead, use RequestProductPurchaseAsync(productId).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
public static IAsyncOperation<string> RequestProductPurchaseAsync(string productId, bool includeReceipt);
function requestProductPurchaseAsync(productId, includeReceipt)
Public Shared Function RequestProductPurchaseAsync (productId As String, includeReceipt As Boolean) As IAsyncOperation(Of String)

매개 변수

productId
String

Platform::String

winrt::hstring

구매할 추가 기능의 제품 ID(시뮬레이션에 정의된 대로)입니다.

includeReceipt
Boolean

bool

메서드가 지정된 productId에 대한 영수증을 반환해야 하는지 여부를 결정합니다.

반환

IAsyncOperation<String>

IAsyncOperation<Platform::String>

IAsyncOperation<winrt::hstring>

제공된 productId에 대한 앱 내 제품 구매 세부 정보를 제공하는 문자열입니다. includeReceipttrue로 설정된 경우 반환된 문자열에는 전체 영수증 xml이 포함됩니다.

특성

설명

RequestProductPurchaseAsync(String)에 대한 설명도 이 오버로드에 적용됩니다.

이 오버로드를 성공적으로 호출한 후 제품 라이선스가 활성 상태인지 확인하려면 LicenseInformation.IsActive 속성을 사용합니다.

코드 샘플에서 이 메서드를 사용하는 방법의 예를 볼 수 있습니다.

추가 정보

적용 대상

RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties)

Microsoft Store에서 추가 기능(앱에서 바로 구매 제품 또는 IAP라고도 함)의 구매를 시뮬레이션하는 데 사용되는 UI를 표시하는 비동기 작업을 만듭니다. 이 오버로드에는 스토어의 단일 제품 항목으로 표시되는 앱에서 바로 구매의 큰 카탈로그 내에서 특정 제품에 대한 세부 정보를 표시하는 데 사용할 수 있는 매개 변수가 포함됩니다.

public:
 static IAsyncOperation<PurchaseResults ^> ^ RequestProductPurchaseAsync(Platform::String ^ productId, Platform::String ^ offerId, ProductPurchaseDisplayProperties ^ displayProperties);
/// [Windows.Foundation.Metadata.Overload("RequestProductPurchaseWithDisplayPropertiesAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<PurchaseResults> RequestProductPurchaseAsync(winrt::hstring const& productId, winrt::hstring const& offerId, ProductPurchaseDisplayProperties const& displayProperties);
[Windows.Foundation.Metadata.Overload("RequestProductPurchaseWithDisplayPropertiesAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<PurchaseResults> RequestProductPurchaseAsync(string productId, string offerId, ProductPurchaseDisplayProperties displayProperties);
function requestProductPurchaseAsync(productId, offerId, displayProperties)
Public Shared Function RequestProductPurchaseAsync (productId As String, offerId As String, displayProperties As ProductPurchaseDisplayProperties) As IAsyncOperation(Of PurchaseResults)

매개 변수

productId
String

Platform::String

winrt::hstring

구매할 추가 기능의 제품 ID(시뮬레이션에 정의된 대로)입니다.

offerId
String

Platform::String

winrt::hstring

productId로 Microsoft Store에 표시되는 대규모 구매 카탈로그 내의 특정 앱 내 제품입니다. 이 값은 앱이 수행하는 콘텐츠와 상관 관계가 있습니다. Microsoft Store는 이 매개 변수 값만 사용하여 PurchaseResults를 항목화합니다.

displayProperties
ProductPurchaseDisplayProperties

구매 시 사용자에게 표시되는 앱에서 바로 구매 제품의 이름입니다.

반환

시뮬레이션된 앱 내 제품 구매 요청의 결과를 포함하는 PurchaseResults 입니다.

특성

설명

RequestProductPurchaseAsync(String)에 대한 설명도 이 오버로드에 적용됩니다.

추가 정보

적용 대상