public void readCardInfo() { try { openApp(); selectFileAccount(); this.cardInfo = readAccount(); getNfcRecordCallback().get().onNfcCardReceived(cardInfo); } catch (AccessCardException ex) { getNfcRecordCallback().get().onNfcCardError(ex.getMessage()); } ; }
public void doDebit(BigDecimal amount) { try { CardTransaction cardTransaction = new CardTransaction( Calendar.getInstance().getTimeInMillis(), cardInfo.getBalance(), amount, cardInfo.getCurrency(), Constant.OPERATION_DEBIT); cardInfo.setBalance(cardInfo.getBalance().subtract(amount)); updateBalance(MessageUtil.formatBalanceToStore(cardInfo.getBalance())); storeTransaction(cardTransaction); } catch (AccessCardException ex) { getNfcRecordCallback().get().onNfcCardError(ex.getMessage()); } ; }