using System.Collections; using System.Collections.Generic; using System; using System.Threading.Tasks; namespace Amanotes.TripleSDK.Core.IAP { public delegate Task ProcessPurchase(string productId, string transactionId, string receipt, string meta); public interface IIAPService { void Init(IEnumerable products); bool IsInitialized(); /// /// /// /// void BuyProductID(string productId); /// /// Restore purchases previously made by this customer. Some platforms automatically restore purchases, like Google. /// Apple currently requires explicit purchase restoration for IAP, conditionally displaying a password prompt. /// void RestorePurchases(); ProcessPurchase ProcessPurchaseDelegate {get; set;} /// /// Called when a purchase fails. /// /// Action onPurchaseFailed { get; set; } /// /// Called when a purchase service intitialized. /// /// Action onInitialized {get; set;} } }