protected int getTransactionCounter() throws CommunicationException {
		int ret = UNKNOW;
		if (LOGGER.isDebugEnabled()) {
			LOGGER.debug("Get Transaction Counter ATC");
		}
		byte[] data = template.get().getProvider().transceive(new CommandApdu(CommandEnum.GET_DATA, 0x9F, 0x36, 0).toBytes());
		if (ResponseUtils.isSucceed(data)) {
			// Extract ATC
			byte[] val = TlvUtil.getValue(data, EmvTags.APP_TRANSACTION_COUNTER);
			if (val != null) {
				ret = BytesUtils.byteArrayToInt(val);
			}
		}
		return ret;
	}
protected int getTransactionCounter ( ) throws CommunicationException { int ret = UNKNOW ; if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "Get Transaction Counter ATC" ) ; } byte [ ] data = template . get ( ) . getProvider ( ) . transceive ( new CommandApdu ( CommandEnum . GET_DATA , 0x9F , 0x36 , 0 ) . toBytes ( ) ) ; if ( ResponseUtils . isSucceed ( data ) ) { byte [ ] val = TlvUtil . getValue ( data , EmvTags . APP_TRANSACTION_COUNTER ) ; if ( val != null ) { ret = BytesUtils . byteArrayToInt ( val ) ; } } return ret ; }
Method used to get Transaction counter

@return the number of card transaction
@throws CommunicationException communication error