protected override async Task OnItemSelected(object item) { if (item is SettingsItemModel itemModel) { switch (itemModel.SettingsType) { case SettingsType.DeviceType: await HandleDeviceTypesSelection(); break; case SettingsType.Discover: var config = new StripeDiscoveryConfiguration { TimeOut = 15, DeviceType = DeviceType, DiscoveyMethod = DiscoveryMethod, IsSimulated = false }; await CoreMethods.PushPageModel <DiscoverReadersPageModel>(config, true); break; case SettingsType.DiscoveryMethod: await HandleDiscoverSelection(); break; } } await base.OnItemSelected(item); }
public override void Init(object initData) { base.Init(initData); if (initData is StripeDiscoveryConfiguration config) { _configuration = config; } LeftButtonText = "Cancel"; LeftButtonColor = Color.FromHex("#007AFF"); TitleText = "Discovery"; _stripeTerminalService.InitTerminalManager(_tokenProviderService); }