public void SendData(ButtonClickEvent e, SingleNode <ContinueButtonComponent> button, [JoinByScreen] SingleNode <BankCardPaymentScreenComponent> screen, [JoinAll] SelectedGoodNode selectedGood, [JoinAll] SelectedMethodNode selectedMethod, [JoinAll] SingleNode <AdyenPublicKeyComponent> adyenProvider, [JoinAll] SingleNode <ClientSessionComponent> session) { BankCardPaymentScreenComponent component = screen.component; Card card = new Card { number = component.Number.Replace(" ", string.Empty), expiryMonth = int.Parse(component.MM).ToString(), expiryYear = "20" + component.YY, holderName = component.CardHolder, cvc = component.CVC }; AdyenBuyGoodsByCardEvent eventInstance = new AdyenBuyGoodsByCardEvent { EncrypedCard = new Encrypter(adyenProvider.component.PublicKey).Encrypt(card.ToString()) }; Entity[] entities = new Entity[] { selectedGood.Entity, selectedMethod.Entity }; base.NewEvent(eventInstance).AttachAll(entities).Schedule(); base.ScheduleEvent <ShowScreenLeftEvent <PaymentProcessingScreenComponent> >(screen); PaymentStatisticsEvent event3 = new PaymentStatisticsEvent { Action = PaymentStatisticsAction.PROCEED, Item = selectedGood.Entity.Id, Screen = screen.component.gameObject.name, Method = selectedMethod.Entity.Id }; base.ScheduleEvent(event3, session); }
private void SendStat(PaymentStatisticsAction action, Entity method) { PaymentStatisticsEvent eventInstance = new PaymentStatisticsEvent { Action = action, Item = this.item.Id, Screen = base.gameObject.name, Method = method.Id }; ECSBehaviour.EngineService.Engine.ScheduleEvent(eventInstance, SelfUserComponent.SelfUser); }
public void Continue(SelectCountryEvent e, Node stub, [JoinAll] SingleNode <SelfUserComponent> selfUser, [JoinAll] SingleNode <ClientSessionComponent> session) { ConfirmUserCountryEvent eventInstance = new ConfirmUserCountryEvent { CountryCode = e.CountryCode }; base.ScheduleEvent(eventInstance, selfUser); PaymentStatisticsEvent event3 = new PaymentStatisticsEvent { Action = PaymentStatisticsAction.COUNTRY_SELECT, Screen = "SelectCountryScreen" }; base.ScheduleEvent(event3, session); }
public void SendData(ButtonClickEvent e, SingleNode <ContinueButtonComponent> button, [JoinByScreen] SingleNode <MobilePaymentScreenComponent> screen, [JoinAll] SelectedGoodNode selectedGood, [JoinAll] SelectedMethodNode selectedMethod, [JoinAll] SingleNode <ClientSessionComponent> session) { string str = screen.component.PhoneCountryCode + screen.component.PhoneNumber.Replace(" ", string.Empty); MobilePaymentDataComponent component = new MobilePaymentDataComponent { PhoneNumber = str }; base.CreateEntity("MobilePayment").AddComponent(component); PlatBoxBuyGoodsEvent eventInstance = new PlatBoxBuyGoodsEvent { Phone = str }; Entity[] entities = new Entity[] { selectedGood.Entity, selectedMethod.Entity }; base.NewEvent(eventInstance).AttachAll(entities).Schedule(); base.ScheduleEvent <ShowScreenLeftEvent <PaymentProcessingScreenComponent> >(screen); PaymentStatisticsEvent event3 = new PaymentStatisticsEvent { Action = PaymentStatisticsAction.PROCEED, Item = selectedGood.Entity.Id, Screen = screen.component.gameObject.name, Method = selectedMethod.Entity.Id }; base.ScheduleEvent(event3, session); }