Пример #1
0
        private async void BillingHandlerOnProductPurchased(int response, Purchase purchase, string purchaseData, string purchaseSignature)
        {
            int result;

            await this.AddProduct(purchase.ProductId);

            if (int.TryParse(purchase.ProductId.Split('_')[0], out result))
            {
                _billingHandler.ConsumePurchase(purchase);
            }
        }
Пример #2
0
 private void BillingHandlerOnProductPurchased(int response, Purchase purchase, string purchaseData, string purchaseSignature)
 {
     ErrorOccur(string.Format("It work{0}, id={1}, state={2}", System.Environment.NewLine, purchase.ProductId, purchase.PurchaseState));
     this.AddProduct(purchase.ProductId).ContinueWith(delegate
     {
         int result;
         if (int.TryParse(purchase.ProductId.Split('_')[0], out result))
         {
             _billingHandler.ConsumePurchase(purchase);
         }
     });
 }