//--------------------------------------
        //  AN_iPurchasesUpdatedListener
        //--------------------------------------

        public void onPurchasesUpdated(SA_iResult billingResult, List <AN_Purchase> purchases)
        {
            foreach (var purchase in purchases)
            {
                if (billingResult.IsSucceeded)
                {
                    m_Purchases.Add(purchase);
                }

                var transaction = new UM_AndroidTransaction(billingResult, purchase);
                UpdateTransaction(transaction);
            }

            if (purchases.Count == 0)
            {
                if (billingResult.IsFailed)
                {
                    var transaction = new UM_AndroidTransaction(billingResult, null);
                    UpdateTransaction(transaction);
                }
                else
                {
                    throw new InvalidEnumArgumentException("billingResult is Succeeded, but no products provided");
                }
            }
        }
 public void RestoreCompletedTransactions()
 {
     foreach (var purchase in AN_Billing.Inventory.Purchases)
     {
         var transaction = new UM_AndroidTransaction(purchase, isRestored: true);
         UpdateTransaction(transaction);
     }
 }
        //--------------------------------------
        //  UM_iInAppClient
        //--------------------------------------

        public void AddPayment(string productId)
        {
            var product = AN_Billing.Inventory.GetProductById(productId);

            AN_Billing.Purchase(product, (result) => {
                var transaction = new UM_AndroidTransaction(result);
                UpdateTransaction(transaction);
            });
        }
        protected override void ObserveTransactions()
        {
            foreach (var purchase in AN_Billing.Inventory.Purchases)
            {
                var transaction = new UM_AndroidTransaction(purchase, isRestored: false);

                if (!UM_AndroidInAppTransactions.IsTransactionCompleted(transaction.Id))
                {
                    UpdateTransaction(transaction);
                }
            }
        }
        private void RestartTransaction(AN_Purchase purchase)
        {
            var transaction = new UM_AndroidTransaction(new SA_Result(), purchase);

            UpdateTransaction(transaction);
        }