private void OnGooglePlayBilling_Connected() { _googlePlayBilling.QuerySkuDetails(ArrInAppProductsSKUs, PurchaseType.InApp); var purchasesResult = _googlePlayBilling.QueryPurchases(PurchaseType.InApp); if (purchasesResult.Status == (int)Error.Ok) { foreach (var purchase in purchasesResult.Purchases) { _purchases.Add(purchase.PurchaseToken, purchase.Sku); // We only expect this SKU if (purchase.Sku == "android.test.purchased") { _googlePlayBilling.AcknowledgePurchase(purchase.PurchaseToken); } } } else { GD.Print($"Purchase query failed: {purchasesResult.ResponseCode} - {purchasesResult.DebugMessage}"); } }
// GUI private void OnQuerySkuDetailsButton_pressed() { _payment.QuerySkuDetails(new string[] { TestItemSku }, PurchaseType.InApp); // Use "subs" for subscriptions. }