protected void extractCardHolderName ( final byte [ ] pData ) { // Extract Card Holder name (if exist) byte [ ] cardHolderByte = TlvUtil . getValue ( pData , EmvTags . CARDHOLDER_NAME ) ; if ( cardHolderByte != null ) { String [ ] name = StringUtils . split ( new String ( cardHolderByte ) . trim ( ) , TrackUtils . CARD_HOLDER_NAME_SEPARATOR ) ; if ( name != null && name . length > 0 ) { template . get ( ) . getCard ( ) . setHolderLastname ( StringUtils . trimToNull ( name [ 0 ] ) ) ; if ( name . length == 2 ) { template . get ( ) . getCard ( ) . setHolderFirstname ( StringUtils . trimToNull ( name [ 1 ] ) ) ; } } } }
Extract card holder lastname and firstname