Пример #1
0
        public void OnProductPurchaseFailed(Product product)
        {
            TDPurchase data = TDPurchaseTable.GetData(product.name);

            if (data == null)
            {
                Log.e("Invalid Config Key");
                return;
            }
            DataAnalysisMgr.S.CustomEvent(DataAnalysisDefine.PURCHASE_FAILED, data.id);
        }
Пример #2
0
        public void OnProductPurchaseCancled(Product product, string res)
        {
            TDPurchase data = TDPurchaseTable.GetData(product.name);

            if (data == null)
            {
                Log.e("Invalid Config Key");
                return;
            }
            DataAnalysisMgr.S.CustomEvent(DataAnalysisDefine.PURCHASE_CANCEL, res);
        }
Пример #3
0
            public bool Execute()
            {
                TDPurchase data = TDPurchaseTable.GetData(m_Product.name);

                if (data == null)
                {
                    Log.e("Invalid Config Key");
                    return(true);
                }
                DataAnalysisMgr.S.Pay((float)data.price / 100, data.itemNum);
                DataAnalysisMgr.S.CustomEvent(DataAnalysisDefine.PURCHASE_SUCCESS, data.id);
                EventSystem.S.Send(SDKEventID.OnPurchaseSuccess, data);
                return(true);
            }
Пример #4
0
        public void OnProductRequestSuccess(Product[] products)
        {
            m_IsPurchaseReady = true;
            for (int i = 0; i < products.Length; ++i)
            {
                TDPurchase data = TDPurchaseTable.GetData(products[i].name);
                if (data == null)
                {
                    Log.w("Purchase Table Config InValid.");
                    continue;
                }

                data.localPriceString = products[i].price;
            }
        }