CurrentApp.RequestProductPurchaseAsync Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
| Nome | Descrizione |
|---|---|
| RequestProductPurchaseAsync(String) |
Importante La funzionalità di acquisto in-app non è supportata nelle applicazioni con privilegi elevati. Richiede l'acquisto di un componente aggiuntivo (detto anche prodotto in-app o IAP). Inoltre, chiamando questo metodo viene visualizzata l'interfaccia utente usata per completare la transazione tramite Microsoft Store. |
| RequestProductPurchaseAsync(String, Boolean) |
Importante La funzionalità di acquisto in-app non è supportata nelle applicazioni con privilegi elevati. Nota [RequestProductPurchaseAsync(String, Boolean) può essere modificato o non disponibile per le versioni dopo Windows 8.1. Usare invece RequestProductPurchaseAsync(String). Richiede l'acquisto di un componente aggiuntivo (detto anche prodotto in-app o IAP). Inoltre, chiamando questo metodo viene visualizzata l'interfaccia utente usata per completare la transazione tramite Microsoft Store. |
| RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties) |
Importante La funzionalità di acquisto in-app non è supportata nelle applicazioni con privilegi elevati. Richiede l'acquisto di un componente aggiuntivo (detto anche prodotto in-app o IAP). Inoltre, chiamando questo metodo viene visualizzata l'interfaccia utente usata per completare la transazione tramite Microsoft Store. Questo overload include parametri che è possibile usare per visualizzare i dettagli per un'offerta specifica all'interno di un ampio catalogo di acquisti in-app rappresentati da una singola voce di prodotto nello Store. |
RequestProductPurchaseAsync(String)
Importante
La funzionalità di acquisto in-app non è supportata nelle applicazioni con privilegi elevati.
Richiede l'acquisto di un componente aggiuntivo (detto anche prodotto in-app o IAP). Inoltre, chiamando questo metodo viene visualizzata l'interfaccia utente usata per completare la transazione tramite Microsoft Store.
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)
Parametri
- productId
-
String
Platform::String
winrt::hstring
ID prodotto del componente aggiuntivo da acquistare.
Valori restituiti
PurchaseResults che contiene i risultati della richiesta di acquisto di prodotti in-app.
- Attributi
Commenti
L'ID prodotto è la stringa usata dall'app per identificare il componente aggiuntivo. Immettere l'ID prodotto quando inviare il del componente aggiuntivo in Centro per i partner, dove è associato alla descrizione, al livello di prezzo e alla durata. Per altre informazioni, vedere Come usare gli ID prodotto per i componenti aggiuntivi nel codice.
È possibile vedere un esempio di come usare questo metodo nell'esempio di codice .
Vedi anche
Si applica a
RequestProductPurchaseAsync(String, Boolean)
Importante
La funzionalità di acquisto in-app non è supportata nelle applicazioni con privilegi elevati.
Nota
[RequestProductPurchaseAsync(String, Boolean) può essere modificato o non disponibile per le versioni dopo Windows 8.1. Usare invece RequestProductPurchaseAsync(String).
Richiede l'acquisto di un componente aggiuntivo (detto anche prodotto in-app o IAP). Inoltre, chiamando questo metodo viene visualizzata l'interfaccia utente usata per completare la transazione tramite Microsoft Store.
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)
Parametri
- productId
-
String
Platform::String
winrt::hstring
ID prodotto del componente aggiuntivo da acquistare.
- includeReceipt
-
Boolean
bool
Determina se il metodo deve restituire le ricevute per il productId specificato.
Valori restituiti
Stringa che fornisce i dettagli delle transazioni in-app per il productId fornito. Se includeReceipt è impostato true, la stringa restituita includerà un xml di ricezione completo.
- Attributi
Commenti
Le osservazioni per RequestProductPurchaseAsync(String) si applicano anche a questo overload.
Per verificare se la licenza del prodotto è attiva dopo una chiamata corretta a questo overload, utilizzare la proprietà LicenseInformation.IsActive.
Vedi anche
Si applica a
RequestProductPurchaseAsync(String, String, ProductPurchaseDisplayProperties)
Importante
La funzionalità di acquisto in-app non è supportata nelle applicazioni con privilegi elevati.
Richiede l'acquisto di un componente aggiuntivo (detto anche prodotto in-app o IAP). Inoltre, chiamando questo metodo viene visualizzata l'interfaccia utente usata per completare la transazione tramite Microsoft Store. Questo overload include parametri che è possibile usare per visualizzare i dettagli per un'offerta specifica all'interno di un ampio catalogo di acquisti in-app rappresentati da una singola voce di prodotto nello Store.
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)
Parametri
- productId
-
String
Platform::String
winrt::hstring
ID prodotto del componente aggiuntivo da acquistare.
- offerId
-
String
Platform::String
winrt::hstring
Funzionalità o contenuto specifico in-app all'interno del catalogo acquisti di grandi dimensioni rappresentato in Microsoft Store dal productId. Questo valore è correlato al contenuto che l'app è responsabile dell'adempimento. Microsoft Store usa questo valore solo per suddividere l'elemento PurchaseResults.
- displayProperties
- ProductPurchaseDisplayProperties
Nome della funzionalità dell'app o dell'offerta di contenuto visualizzata all'utente al momento dell'acquisto.
Valori restituiti
PurchaseResults che contiene i risultati della richiesta di acquisto di prodotti in-app.
- Attributi
Commenti
Le osservazioni per RequestProductPurchaseAsync(String) si applicano anche a questo overload.