Esempio n. 1
0
 private void handleProductsLoaded(List <SkuInfo> listSkus, CommerceError cError)
 {
     if (cError.HasError())
     {
         string text = "";
         text = "handleProductsLoaded: Error Found: Number " + cError.GetErrorNo() + ", Desc " + cError.GetErrorDesc();
         Service.Get <EventDispatcher>().DispatchEvent(new CommerceServiceErrors.ProductsLoadedError(cError));
     }
     else
     {
         Service.Get <EventDispatcher>().DispatchEvent(new CommerceServiceEvents.ProductsLoaded(success: true));
         productsReloadTime = Time.time + productsReloadAfterSecs;
     }
 }
Esempio n. 2
0
        private void handlePurchaseRetrieval(PurchaseInfo PI, SkuInfo purSkuInfo, CommerceError cError)
        {
            string text = "";

            if (cError.HasError())
            {
                text = "handlePurchaseRetrieval: Error Found: Number " + cError.GetErrorNo() + ", Desc " + cError.GetErrorDesc() + ", skuToLookup " + cError.GetSkuToLookup();
                Service.Get <EventDispatcher>().DispatchEvent(new CommerceServiceErrors.PurchaseVerifiedError(cError));
            }
            else
            {
                text = "handlePurchaseRetrieval: Purchase Success so far purchaseinfo object\n" + PI.ToString();
                verifyPurchaseWithService(PI);
            }
        }
Esempio n. 3
0
        private void handleRestorePlayerPurchases(List <PurchaseInfo> playerInventory, List <SkuInfo> skuInfos, CommerceError cError)
        {
            string text = "";

            if (cError.HasError())
            {
                text = "RestorePlayerPurchases: Error Found: Number " + cError.GetErrorNo() + ", Desc " + cError.GetErrorDesc();
                Service.Get <EventDispatcher>().DispatchEvent(new CommerceServiceErrors.RestoreVerifiedError(cError));
                return;
            }
            object obj = text;

            text = string.Concat(obj, "Total Purchases to Restore: ", playerInventory.Count, "\n");
            foreach (PurchaseInfo item in playerInventory)
            {
            }
            verifyPurchaseRestoreWithService(playerInventory, skuInfos);
        }