private void RefreshPurchasedItems() { _purchases = _billingHandler.GetPurchases(ItemType.Product); var stringBuilder = new StringBuilder(); stringBuilder.Append("Purchases: "); foreach (var purchase in _purchases) { stringBuilder.AppendLine(string.Format("id={0},state={1},tocken={2},devel={3},order={4}", purchase.ProductId, purchase.PurchaseState, purchase.PurchaseToken, purchase.DeveloperPayload, purchase.OrderId)); } ErrorOccur(stringBuilder.ToString()); }
private void RefreshPurchasedItems() { try { var purchases = _billingHandler.GetPurchases(ItemType.Product); _purchases = purchases == null ? new List <ErshPurchase>() : purchases.Where(purchase => purchase.PurchaseState == 0).Select(purchase => PurchaseCreator.Create(purchase.ProductId)).ToList(); } catch (Exception exception) { GaService.TrackAppException(this.Class, "RefreshPurchasedItem", exception, false); } }