private void btnProcess_Click(object sender, RoutedEventArgs e) { switch (this._flujo) { case PagoServicio.CuentaServicio: string mensaje = string.Empty; if (Valida1_3(ref mensaje)) { res = CasosDeUso.getResultado((Application.Current as App).matrix, CasosDeUso.getCodigoCU(ClavesOperacion.PagoServicio), (int)(Application.Current as App).EstatusToken, (int)(Application.Current as App).EstatusSoftToken); if (!("TF".Equals(res.token))){ TokenManager.obtenerCore(); String error = TokenManager.coreInicializadoCorrecto(); if ("".Equals(error)) { tLeyendaJuridicoSuperToken.Text = TextosPantallas.tLeyendaJuridicoSuperToken + TextosBotones.bConfirmar; w2_3_ST.Visibility = System.Windows.Visibility.Visible; } } Paso2_3(); } else { MessageBox.Show(mensaje); } break; case PagoServicio.Confirmacion: if (this._vm.IsTokenFinal) { res = CasosDeUso.getResultado((Application.Current as App).matrix, CasosDeUso.getCodigoCU(ClavesOperacion.PagoServicio), (int)(Application.Current as App).EstatusToken, (int)(Application.Current as App).EstatusSoftToken); progress.Hide(); if ("TF".Equals(res.token)) { token.Show(true); } else if ("ST".Equals(res.token)) { TokenManager.obtenerCore(); String error = TokenManager.coreInicializadoCorrecto(); if ("".Equals(error)) { string import = Convert.ToDouble(tbxImporte.Text).FormatoImporte(); String cuentaTruncada = this._vm.Cuenta.NumeroCuenta.Length > 12 ? this._vm.Cuenta.NumeroCuenta.Substring(this._vm.Cuenta.NumeroCuenta.Length - 12) : this._vm.Cuenta.NumeroCuenta; introducirPin.Show(this._vm.IsTokenFinal, ClavesOperacion.PagoServicio, (App.Current as App).CodigoCliente, CasosDeUso.Mexicanpeso, import, cuentaTruncada.Trim(), this._vm.Servicio.Cuenta.Trim()); //introducirPin.Show(this._vm.IsTokenFinal, ClavesOperacion.PagoServicio, (App.Current as App).CodigoCliente, CasosDeUso.Mexicanpeso, import, cuentaTruncada.Trim(), this._vm.Servicio.Cuenta.Trim()); } else { token.Title = "NIP Dinámico SuperToken"; token.Show(); } } } else { progress.Show(); this._vm.PagarServicio(tbxReferencia.Text, Convert.ToDouble(tbxImporte.Text)); this._vm.emptyValues(); } break; } }
void _vm_ValidaAccesoComplete(Model.Dto.DtoValidaAcceso e) { string operacion = e.operacion; this._vm.IsTokenInicial = Convert.ToBoolean(e.isToken); this._vm.IsTokenFinal = Convert.ToBoolean(e.isTokenFinal); if (!string.IsNullOrEmpty(operacion)) { res = CasosDeUso.getResultado((Application.Current as App).matrix, CasosDeUso.getCodigoCU(operacion), (int)(Application.Current as App).EstatusToken, (int)(Application.Current as App).EstatusSoftToken); if (operacion.Equals(ClavesOperacion.AltaPagoServicio)) { this._navigation = Navigation.AltaServicio; if (this._vm.IsTokenInicial) { progress.Hide(); insertToken(res); } else { InitAltaServicioViewModel(); } } if (operacion.Equals(ClavesOperacion.BajaPagoServicio)) { this._navigation = Navigation.BajaServicio; if (this._vm.IsTokenInicial) { progress.Hide(); insertToken(res); } else { InitBajaServicioViewModel(); } } } }