Beispiel #1
0
        private async void GetCustomerPurchaseId()
        {
            try
            {
                String aadToken = await GetTokenFromAzureOAuthAsync();

                if (!string.IsNullOrEmpty(aadToken))
                {
                    String result = await CurrentApp.GetCustomerPurchaseIdAsync(aadToken, "*****@*****.**");

                    Output.Text = result;
                }
            }
            catch (Exception ex)
            {
                if ((uint)ex.HResult == IAP_E_UNEXPECTED)
                {
                    rootPage.NotifyUser($"GetCustomerPurchaseIdAsync failed: {IAP_E_UNEXPECTED_MESSAGE}", NotifyType.ErrorMessage);
                }
                else
                {
                    rootPage.NotifyUser("GetCustomerPurchaseIdAsync failed.", NotifyType.ErrorMessage);
                }
            }
        }