Пример #1
0
 public MarketPurchaseEvent(PurchasableVirtualItem item, string payload, Dictionary<string, string> extra, object sender)
     : base(sender)
 {
     mPurchasableVirtualItem = item;
     mPayload = payload;
     mExtra = extra;
 }
Пример #2
0
 public MarketPurchaseEvent(PurchasableVirtualItem item, string payload, string token, object sender)
     : base(sender)
 {
     mPurchasableVirtualItem = item;
     mPayload = payload;
     mToken = token;
 }
Пример #3
0
 public void PostItemPurchasedEvent(PurchasableVirtualItem purchasableVirtualItem, String payload)
 {
     LogEvent("ItemPurchased");
     if (OnItemPurchasedEvent != null)
     {
         OnItemPurchasedEvent(purchasableVirtualItem,payload);
     }
 }
Пример #4
0
 public void PostItemPurchaseStartedEvent(PurchasableVirtualItem purchasableVirtualItem)
 {
     LogEvent("ItemPurchaseStarted");
     if (OnItemPurchaseStartedEvent != null)
     {
         OnItemPurchaseStartedEvent(purchasableVirtualItem);
     }
 }
Пример #5
0
 /**
  * Consumes the given purchase, or writes error message to log if unable to consume
  *
  * @param purchase purchase to be consumed
  */
 private void consumeIfConsumable(PurchasableVirtualItem pvi) {
     SoomlaUtils.LogDebug(TAG, "TODO consumeIfConsumable");
     
     try {
         if (!(pvi is LifetimeVG)) {
             StoreManager.GetInstance().Consume(pvi.getItemId());
         }
     } catch (Exception e) {
         SoomlaUtils.LogDebug(TAG, "Error while consuming: itemId: " + pvi.getItemId());
         BusProvider.Instance.Post(new UnexpectedStoreErrorEvent(e.Message));
     }
     
 }
 public MarketPurchaseStartedEvent(PurchasableVirtualItem item, object sender)
     : base(sender)
 {
     mPurchasableVirtualItem = item;
 }
 public MarketPurchaseStartedEvent(PurchasableVirtualItem item)
     : this(item,null)
 {
 }
Пример #8
0
 /**
  * Consumes the given purchase, or writes error message to log if unable to consume
  *
  * @param purchase purchase to be consumed
  */
 private void consumeIfConsumable(PurchasableVirtualItem pvi)
 {
 }
Пример #9
0
 public void PostMarketPurchaseEvent(PurchasableVirtualItem purchasableVirtualItem, String payload, String token)
 {
     LogEvent("MarketPurchase");
     if (OnMarketPurchaseEvent != null)
     {
         OnMarketPurchaseEvent(purchasableVirtualItem, payload, token);
     }
 }
Пример #10
0
 public MarketPurchaseEvent(PurchasableVirtualItem item, string payload, Dictionary<string, string> extra)
     : this(item, payload, extra, null)
 {
 }
 public MarketPurchaseCancelledEvent(PurchasableVirtualItem item)
     : this(item,null)
 {
 }
Пример #12
0
 public ItemPurchasedEvent(PurchasableVirtualItem item, string payload, object sender)
     : base(sender)
 {
     mPurchasableVirtualItem = item;
     mPayload = payload;
 }
Пример #13
0
 public ItemPurchasedEvent(PurchasableVirtualItem item, string payload)
     : this(item,payload,null)
 {
 }
Пример #14
0
 /**
  * Consumes the given purchase, or writes error message to log if unable to consume
  *
  * @param purchase purchase to be consumed
  */
 private void consumeIfConsumable(PurchasableVirtualItem pvi, StoreTransaction transaction)
 {
     try
     {
         if (!(pvi is SingleUseVG))
         {
             if (pvi.GetPurchaseType() is PurchaseWithMarket)
             {
                 PurchaseWithMarket pwm = (PurchaseWithMarket)pvi.GetPurchaseType();
                 string productId = pwm.getMarketItem().getProductId();
                 if (transaction.ProductId == productId)
                     StoreManager.GetInstance().Consume(transaction);
             }
         }
     }
     catch (Exception e)
     {
         SoomlaUtils.LogDebug(TAG, "Error while consuming: itemId: " + pvi.getItemId());
         BusProvider.Instance.Post(new UnexpectedStoreErrorEvent(e.Message));
     }
 }
Пример #15
0
 public void PostMarketPurchaseCancelledEvent(PurchasableVirtualItem purchasableVirtualItem)
 {
     LogEvent("MarketPurchaseCancelled");
     if (OnMarketPurchaseCancelledEvent != null)
     {
         OnMarketPurchaseCancelledEvent(purchasableVirtualItem);
     }
 }
Пример #16
0
 public void setAssociatedItem(PurchasableVirtualItem associatedItem)
 {
     mAssociatedItem = associatedItem;
 }
Пример #17
0
 public MarketPurchaseEvent(PurchasableVirtualItem item, string payload, string token)
     : this(item, payload, token, null)
 {
 }