Ejemplo n.º 1
0
        protected override Variable Evaluate(ParsingScript script)
        {
            List <Variable> args = script.GetFunctionArgs();

            Utils.CheckArgs(args.Count, 1, m_name, true);

            string productId = args[0].AsString();

            string description = InAppBilling.GetDescription(productId);

            return(new Variable(description));
        }
Ejemplo n.º 2
0
        protected override Variable Evaluate(ParsingScript script)
        {
            List <Variable> args = script.GetFunctionArgs();

            Utils.CheckArgs(args.Count, 2, m_name, true);

            string strAction = args[0].AsString();
            string productId = args[1].AsString();

            InAppBilling.RegisterCallbacks(strAction);
            InAppBilling.PurchaseItem(productId);

            return(Variable.EmptyInstance);
        }
Ejemplo n.º 3
0
        protected override Variable Evaluate(ParsingScript script)
        {
            List <Variable> args = script.GetFunctionArgs();

            Utils.CheckArgs(args.Count, 1, m_name);
            string strAction = args[0].AsString();

            for (int i = 1; i < args.Count; i++)
            {
                string productId = Utils.GetSafeString(args, i);
                InAppBilling.AddProductId(productId);
            }

            InAppBilling.RegisterCallbacks(strAction);
            InAppBilling.Restore();

            return(Variable.EmptyInstance);
        }