private List <ShopItemInformation> ConstructShopItemInformation()
    {
        string products = StoreKitHelper.GetValidProducts();

        Debug.Log(products);

        if (products == null)
        {
            return(null);
        }

        ArrayList productList = JsonUtility.jsonDecode(products) as ArrayList;

        if (productList == null)
        {
            return(null);
        }

        List <ShopItemInformation> temp = new List <ShopItemInformation>();

        foreach (object product in productList)
        {
            Hashtable info = product as Hashtable;
            if (info == null)
            {
                return(null);
            }
            ShopItemInformation itemInformation = new ShopItemInformation();
            itemInformation.Initialize(info);
            temp.Add(itemInformation);
        }

        List <ShopItemInformation> result       = new List <ShopItemInformation>();
        List <ProductConfigData>   productsData = ((iOSShopUtility)this.ShopModule).ProductsData;

        foreach (ProductConfigData p in productsData)
        {
            foreach (ShopItemInformation info in temp)
            {
                if (p.ProductID.Equals(info.ProductID))
                {
                    info.GemQuantity = p.GemQuantity;
                    info.IconName    = p.IconName;
                    result.Add(info);
                    break;
                }
            }
        }

        return(result);
    }
    private List <ShopItemInformation> ConstructShopItemInformation()
    {
        string products = StoreKitHelper.GetValidProducts();

        Debug.Log(products);

        if (products == null)
        {
            return(null);
        }

        ArrayList productList = new ArrayList();        //= Json.jsonDecode(products) as ArrayList;

        if (productList == null)
        {
            return(null);
        }

        List <ShopItemInformation> results = new List <ShopItemInformation>();

        foreach (object product in productList)
        {
            Hashtable info = product as Hashtable;
            if (info == null)
            {
                return(null);
            }
            ShopItemInformation itemInformation = new ShopItemInformation();
            itemInformation.Initialize(info);
            results.Add(itemInformation);
        }

        /*
         * results.Sort((x, y) =>
         *                      {
         *                              if(float.Parse(x.Price) < float.Parse(y.Price))
         *                              {
         *                                      return -1;
         *                              }
         *                              else if(float.Parse(x.Price) > float.Parse(y.Price))
         *                              {
         *                                      return 1;
         *                              }
         *                              return 0;
         *                      });
         */
        return(results);
    }