Class Track1
java.lang.Object
org.jpos.core.Track1
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFluent builder that parses a raw track1 string or assembles aTrack1from individual fields and validates the result against a configurable pattern. -
Constructor Summary
ConstructorsConstructorDescriptionTrack1(Track1.Builder builder) Copies the track1 fields from the suppliedTrack1.Builder. -
Method Summary
Modifier and TypeMethodDescriptionstatic Track1.Builderbuilder()Creates a new builder for assembling aTrack1.booleangetCvv()Returns the CVV/CVC value, when present.Returns the discretionary data trailing the service code.getExp()Returns the expiration date.Returns the cardholder name encoded on the track.getPan()Returns the primary account number.Returns the service code.getTrack()Returns the raw track1 string this object was built from.inthashCode()booleanisEMV()Returnstruewhen the service code marks this as an IC (EMV) card.booleanisICCard()Returnstruewhen the service code marks this as an IC card (first digit2for international or6for national).booleanReturnstruewhen the service code marks this as an internationally-usable IC card (first digit2).toString()
-
Constructor Details
-
Track1
Copies the track1 fields from the suppliedTrack1.Builder.- Parameters:
builder- builder carrying the parsed or assembled track1 fields
-
-
Method Details
-
getPan
-
getNameOnCard
Returns the cardholder name encoded on the track.- Returns:
- cardholder name as encoded on the track
-
getExp
-
getCvv
-
getServiceCode
Returns the service code.- Returns:
- three-digit service code, or
nullif absent
-
getDiscretionaryData
Returns the discretionary data trailing the service code.- Returns:
- remaining discretionary data, or
nullif absent
-
getTrack
-
isEMV
Returnstruewhen the service code marks this as an IC (EMV) card.- Returns:
trueif the Track 1 service code indicates an IC card
-
isICCard
Returnstruewhen the service code marks this as an IC card (first digit2for international or6for national).- Returns:
trueif the Track 1 service code indicates an IC card
-
isInternationalICCard
Returnstruewhen the service code marks this as an internationally-usable IC card (first digit2).- Returns:
trueif the Track 1 service code indicates an international IC card
-
toString
-
equals
-
hashCode
-
builder
Creates a new builder for assembling aTrack1.- Returns:
- a new
Track1.Builderfor assembling aTrack1
-