public void InitScreen(XsollaUtils utils, XsollaForm form) { XsollaTranslations translations = utils.GetTranslations(); Resizer.ResizeToParrent(gameObject); bool isPurchaseNull = utils.GetPurchase() == null; if (isPurchaseNull || !utils.GetPurchase().IsPurchase() || !utils.GetPurchase().IsPaymentSystem()) { if (!isPurchaseNull) { isPrevStepPaymentList = !utils.GetPurchase().IsPaymentSystem(); } paymentForm.OnClickBack += () => { Back(); }; } paymentForm.InitView(translations, form); if (form.GetSummary() != null) { tower.InitView(translations, form.GetSummary()); } else { tower.gameObject.SetActive(false); } }
public void Init(XsollaUtils pUtils, Action <RadioButton.RadioType> pActionNavClick) { // Инициализация навигационного меню mActionNavClick = pActionNavClick; if (pUtils.GetPurchase() == null || !pUtils.GetPurchase().IsPurchase()) { InitMenu(pUtils); } }
protected override void RecieveUtils(XsollaUtils utils) { Resizer.ResizeToParrent(mainScreen); base.RecieveUtils(utils); InitHeader(utils); InitFooter(utils); if (utils.GetPurchase() == null || !utils.GetPurchase().IsPurchase()) { InitMenu(utils); } }
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); }
private void TryPay() { Logger.Log("Try pay"); if (Utils.GetPurchase() != null) { if (currentPurchase.counter >= 2) { NextPaymentStep(currentPurchase.GetMergedMap()); } else { LoadQuickPayment(); } } else { if (currentPurchase.counter >= 3) { NextPaymentStep(currentPurchase.GetMergedMap()); } else { LoadQuickPayment(); } } }
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); }
protected override void RecieveUtils(XsollaUtils utils) { StyleManager.Instance.ChangeTheme(utils.GetSettings().GetTheme()); mainScreen = Instantiate(mainScreen); mainScreen.transform.SetParent(container.transform); mainScreen.SetActive(true); mainScreenContainer = mainScreen.GetComponentsInChildren <ScrollRect> ()[0].gameObject; menuTransform = mainScreen.GetComponentsInChildren <RectTransform> ()[8].transform; Resizer.ResizeToParrent(mainScreen); base.RecieveUtils(utils); InitHeader(utils); InitFooter(utils); if (utils.GetPurchase() == null || !utils.GetPurchase().IsPurchase()) { InitMenu(utils); } }
public void InitScreen(XsollaUtils utils, XsollaForm form) { XsollaTranslations translations = utils.GetTranslations (); Resizer.ResizeToParrent (gameObject); bool isPurchaseNull = utils.GetPurchase () == null; if (isPurchaseNull || !utils.GetPurchase ().IsPurchase () || !utils.GetPurchase ().IsPaymentSystem ()) { if(!isPurchaseNull) isPrevStepPaymentList = !utils.GetPurchase ().IsPaymentSystem (); paymentForm.OnClickBack += () => { Back ();}; } paymentForm.InitView (translations, form); if (form.GetSummary () != null) tower.InitView (translations, form.GetSummary ()); else tower.gameObject.SetActive (false); }
protected override void RecieveUtils(XsollaUtils utils) { StyleManager.Instance.ChangeTheme(utils.GetSettings().GetTheme()); mainScreen = Instantiate (mainScreen); mainScreen.transform.SetParent (container.transform); mainScreen.SetActive (true); mainScreenContainer = mainScreen.GetComponentsInChildren<ScrollRect> ()[0].gameObject; menuTransform = mainScreen.GetComponentsInChildren<RectTransform> ()[8].transform; Resizer.ResizeToParrent (mainScreen); base.RecieveUtils(utils); InitHeader(utils); InitFooter (utils); if(utils.GetPurchase() == null || !utils.GetPurchase().IsPurchase()) InitMenu(utils); }