Пример #1
0
        public void Proceed(Entity method)
        {
            this.selectedMethod = method;
            this.SendStat(PaymentStatisticsAction.MODE_SELECT, method);
            PaymentMethodComponent component = method.GetComponent <PaymentMethodComponent>();

            if (component.MethodName == PaymentMethodNames.PAYGURU)
            {
                Entity[] entities = new Entity[] { method, this.item };
                base.NewEvent <PayguruProcessEvent>().AttachAll(entities).Schedule();
                this.CloseAll();
            }
            else if (component.MethodName == PaymentMethodNames.MOBILE)
            {
                this.ShowPlatbox(method);
            }
            else if ((component.MethodName == PaymentMethodNames.CREDIT_CARD) && (component.ProviderName == "adyen"))
            {
                this.ShowAdyen(method);
            }
            else if ((component.MethodName == PaymentMethodNames.QIWI_WALLET) && (component.ProviderName == "qiwi"))
            {
                this.ShowQiwi(method, string.Empty);
            }
            else
            {
                Entity[] entities = new Entity[] { method, this.item };
                base.NewEvent <ProceedToExternalPaymentEvent>().AttachAll(entities).Schedule();
                this.SendStat(PaymentStatisticsAction.PROCEED, method);
                this.process.Show(this.item, method);
            }
        }
Пример #2
0
 private void FillFromEntity(Entity entity)
 {
     if (entity.HasComponent <PaymentMethodComponent>())
     {
         PaymentMethodComponent component = entity.GetComponent <PaymentMethodComponent>();
         this.SetMethodName(component.MethodName);
         this.text.text = component.ShownName;
         this.saleItem.SetActive(false);
         this.saleItemLabelEmpty.SetActive(false);
         this.saleItemXtraLabelEmpty.SetActive(false);
         this.saleItemLabelText.text = string.Empty;
     }
 }