Exemplo n.º 1
0
        /// <summary>
        /// Handles the <c>onItemPurchaseStarted</c> event, which is fired when a specific
        /// <c>PurchasableVirtualItem</c> purchase process has started.
        /// </summary>
        /// <param name="message">Message that contains information about the item being purchased.</param>
        public void onItemPurchaseStarted(string message)
        {
            SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY onItemPurchaseStarted:" + message);

            PurchasableVirtualItem pvi = (PurchasableVirtualItem)StoreInfo.GetItemByItemId(message);

            StoreEvents.OnItemPurchaseStarted(pvi);
        }
Exemplo n.º 2
0
        public static void onItemPurchaseStarted(ItemPurchaseStartedEvent _Event, bool alsoPush)
        {
            SoomlaWpStore.domain.PurchasableVirtualItem purchasableVirtualItem = _Event.GetPurchasableVirtualItem();
            SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY onItemPurchaseStarted:" + purchasableVirtualItem.getItemId());

            PurchasableVirtualItem pvi = (PurchasableVirtualItem)StoreInfo.GetItemByItemId(purchasableVirtualItem.getItemId());

            StoreEvents.OnItemPurchaseStarted(pvi);

            if (alsoPush)
            {
                sep.PushEventOnItemPurchaseStarted(_Event);
            }
        }
Exemplo n.º 3
0
        public void onItemPurchaseStarted(string message, bool alsoPush)
        {
            SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY onItemPurchaseStarted:" + message);

            var eventJSON = new JSONObject(message);

            PurchasableVirtualItem pvi = (PurchasableVirtualItem)StoreInfo.GetItemByItemId(eventJSON["itemId"].str);

            StoreEvents.OnItemPurchaseStarted(pvi);

            if (alsoPush)
            {
#if (UNITY_ANDROID || UNITY_IOS) && !UNITY_EDITOR
                sep.PushEventOnItemPurchaseStarted(pvi);
#endif
            }
        }