public void Purchase(PremiumBundle bundleItem, int amount, string userID)
        {
#if UNITY_WEBPLAYER
            if (Type.GetType("FacebookPurchasing") != null)
            {
                FacebookPurchasing = this.gameObject.AddComponent <FacebookPurchasing>() as IFacebookPurchase;
            }
#endif

            if (FacebookPurchasing == null)
            {
                Debug.LogError("Facebook purchase not found. Please add the FacebookPurchase script from the CloudGoodsFacebookAddon folder to this object and drag it as the public reference to the facebookPurchase variable in the inspector");
                return;
            }

            currentBundleID = int.Parse(bundleItem.BundleID);
            FacebookPurchasing.Purchase(bundleItem, amount, OnReceivedFacebookCurrencyPurchase);
        }
    public void Purchase(PremiumBundle bundleItem, int amount, string userID)
    {
        if (Type.GetType("FacebookPurchasing") != null)
        {
            FacebookPurchasing = this.gameObject.AddComponent(Type.GetType("FacebookPurchasing")) as IFacebookPurchase;
        }

        if (FacebookPurchasing == null)
        {
            Debug.LogError("Facebook purchase not found. Please add the FacebookPurchase script from the CloudGoodsFacebookAddon folder to this object and drag it as the public reference to the facebookPurchase variable in the inspector");
            return;
        }

        currentBundleID = int.Parse(bundleItem.BundleID);
        Console.WriteLine("Credit bundle purchase:  ID: " + bundleItem.BundleID + " Amount: " + amount);
        Debug.Log("ID: " + bundleItem.BundleID + "\nAmount: " + amount + "\nUserID: " + userID);
        FacebookPurchasing.Purchase(bundleItem, amount, OnReceivedFacebookCurrencyPurchase);
    }