protected virtual void RecieveUtils(XsollaUtils utils)
        {
            Logger.Log("Utils recived");
            Utils = utils;
            XsollaPurchase xsollaPurchase = utils.GetPurchase();

            if (xsollaPurchase != null)
            {
                bool isPurchase = xsollaPurchase.IsPurchase();
                if (xsollaPurchase.paymentSystem != null && isPurchase)
                {
                    NextPaymentStep(currentPurchase.GetMergedMap());
                }
                else if (isPurchase)
                {
                    LoadQuickPayment();
                }
                else
                {
                    LoadShop(utils);
                }
            }
            else
            {
                LoadShop(utils);
            }
            SetLoading(false);
        }
Esempio n. 2
0
        protected virtual void RecieveUtils(XsollaUtils utils)
        {
            Logger.Log("Utils recived");
            Utils = utils;
            if (isSimple)
            {
                BaseParams += "&access_token=" + utils.GetAcceessToken();
                currentPurchase.GetPart(ActivePurchase.Part.TOKEN).Remove("access_data");
                currentPurchase.GetPart(ActivePurchase.Part.TOKEN).Add("access_token", utils.GetAcceessToken());
            }
            XsollaPurchase xsollaPurchase = utils.GetPurchase();

            if (xsollaPurchase != null)
            {
                bool isPurchase = xsollaPurchase.IsPurchase();
                if (xsollaPurchase.paymentSystem != null && isPurchase)
                {
                    NextPaymentStep(currentPurchase.GetMergedMap());
                }
                else if (isPurchase)
                {
                    LoadQuickPayment();
                }
                else
                {
                    LoadShop(utils);
                }
            }
            else
            {
                LoadShop(utils);
            }
            SetLoading(false);
        }
Esempio n. 3
0
        public IParseble Parse(JSONNode utilsNode)
        {
            user         = new XsollaUser().Parse(utilsNode [XsollaApiConst.R_USER]) as XsollaUser;
            project      = new XsollaProject().Parse(utilsNode [XsollaApiConst.R_PROJECT]) as XsollaProject;
            purchase     = new XsollaPurchase().Parse(utilsNode [XsollaApiConst.R_PURCHASE]) as XsollaPurchase;
            settings     = new XsollaSettings().Parse(utilsNode [XsollaApiConst.R_SETTINGS]) as XsollaSettings;
            translations = new XsollaTranslations().Parse(utilsNode [XsollaApiConst.R_TRANSLATIONS]) as XsollaTranslations;
            api          = new XsollaApi().Parse(utilsNode [XsollaApiConst.R_API]) as XsollaApi;

            return(this);
        }
Esempio n. 4
0
        public IParseble Parse(JSONNode utilsNode)
        {
            accessToken 	= utilsNode [XsollaApiConst.ACCESS_TOKEN].Value;
            user 			= new XsollaUser ().Parse (utilsNode [XsollaApiConst.R_USER]) as XsollaUser;
            project 		= new XsollaProject ().Parse (utilsNode [XsollaApiConst.R_PROJECT]) as XsollaProject;
            purchase 		= new XsollaPurchase ().Parse (utilsNode [XsollaApiConst.R_PURCHASE]) as XsollaPurchase;
            settings 		= new XsollaSettings ().Parse (utilsNode [XsollaApiConst.R_SETTINGS]) as XsollaSettings;
            translations 	= new XsollaTranslations ().Parse (utilsNode [XsollaApiConst.R_TRANSLATIONS]) as XsollaTranslations;
            api 			= new XsollaApi ().Parse (utilsNode [XsollaApiConst.R_API]) as XsollaApi;

            return this;
        }
Esempio n. 5
0
        public IParseble Parse(JSONNode utilsNode)
        {
            accessToken  = utilsNode [XsollaApiConst.ACCESS_TOKEN].Value;
            user         = new XsollaUser().Parse(utilsNode [XsollaApiConst.R_USER]) as XsollaUser;
            project      = new XsollaProject().Parse(utilsNode [XsollaApiConst.R_PROJECT]) as XsollaProject;
            purchase     = new XsollaPurchase().Parse(utilsNode [XsollaApiConst.R_PURCHASE]) as XsollaPurchase;
            settings     = new XsollaSettings().Parse(utilsNode [XsollaApiConst.R_SETTINGS]) as XsollaSettings;
            translations = new XsollaTranslations().Parse(utilsNode [XsollaApiConst.R_TRANSLATIONS]) as XsollaTranslations;
            api          = new XsollaApi().Parse(utilsNode [XsollaApiConst.R_API]) as XsollaApi;
            mBonus       = new XsollaBonus().Parse(utilsNode["bonus"]) as XsollaBonus;

            return(this);
        }