Class Track2.Builder
java.lang.Object
org.jpos.core.Track2.Builder
- Enclosing class:
Track2
- Since:
- jPOS 2.0.5 This class is based on the old 'CardHolder' class and adds support for multiple PAN and Expiration dates taken from manual entry, track1, track2. It also corrects the name.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Constructs the Track2 data based on the card data provided.discretionaryData(String discretionaryData) Optional method, can be used to override default patternserviceCode(String serviceCode)
-
Method Details
-
pan
-
exp
-
cvv
-
serviceCode
-
discretionaryData
-
pattern
Optional method, can be used to override default pattern- Parameters:
pattern- overrides default pattern- Returns:
- this builder
-
track
- Throws:
InvalidCardException
-
buildTrackData
Constructs the Track2 data based on the card data provided. The generated Track2 data is validated using the pattern. If the Track2 data doesn't match the pattern, the track attribute keeps the original value.- Returns:
- this builder.
-
build
-