PurchasesResult.cs 723 B

123456789101112131415161718192021222324
  1. using Godot;
  2. using Godot.Collections;
  3. namespace AndroidInAppPurchasesWithCSharp.GodotGooglePlayBilling
  4. {
  5. public partial class PurchasesResult : BillingResult
  6. {
  7. public PurchasesResult() { }
  8. public PurchasesResult(Dictionary purchasesResult)
  9. : base(purchasesResult)
  10. {
  11. try
  12. {
  13. Purchases = (purchasesResult.Contains("purchases") ? GooglePlayBillingUtils.ConvertPurchaseDictionaryArray((Array)purchasesResult["purchases"]) : null);
  14. }
  15. catch (System.Exception ex)
  16. {
  17. GD.Print("PurchasesResult: ", ex.ToString());
  18. }
  19. }
  20. public Purchase[] Purchases { get; set; }
  21. }
  22. }