コード例 #1
0
        public static async Task BuyProduct(string productId)
        {
            InAppBillingPurchase purchase = await InAppPurchase.Buy(productId, true);

            string message = purchase == null ? LN.PurchaseFailed : LN.ThanksForYourSupport;
            await Shell.Current.CurrentPage.DisplayToastAsync(message);
        }
コード例 #2
0
 private async void DonateHigh_Clicked(object sender, EventArgs e)
 {
     if (await InAppPurchase.Buy(InAppProducts.DonateHigh, true) != null)
     {
         await DisplayAlert(LN.Purchase, LN.ThanksForYourSupport, LN.Ok);
     }
     else
     {
         await DisplayAlert(LN.Purchase, LN.PurchaseFailed, LN.Ok);
     }
 }