private async Task OnValidateData(ISmartCard smartCard) { try { // try to get the data var data = await smartCard.GetData(); // if we get here, we got the data AppendText("Retrieved data from card:"); AppendText(data); // Todo: Add validation of data var date = DateTime.Parse(data); if (DateTime.Now > date) { await SetResult(false); } else { await SetResult(true); } } catch (SmartCardException) { AppendText("Error, card not read"); } }
private async Task OnValidatePin(ISmartCard smartCard) { try { // try to get the data var data = await smartCard.GetData(); // if we get here, we got the data AppendText("Successfully validated pin"); AppendText(data); } catch (SmartCardException) { AppendText("Incorrect PIN"); } }
private async Task OnValidateData(ISmartCard smartCard) { try { // try to get the data var data = await smartCard.GetData(); // if we get here, we got the data AppendText("Retrieved data from card:"); AppendText(data); // Todo: Add validation of data var date = DateTime.Parse(data); if(DateTime.Now > date) await SetResult(false); else await SetResult(true); } catch (SmartCardException) { AppendText("Error, card not read"); } }