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); }
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); } }