com.ibm.retail.saf.provider
Interface CreditPaymentInfo

All Superinterfaces:
PaymentInfo, POSInfo, java.io.Serializable
All Known Implementing Classes:
CreditCard

public interface CreditPaymentInfo
extends PaymentInfo

Contains the credit card information needed to tender payment at the point-of-sale system.


Field Summary
static java.lang.String AMEX
          American express credit card type identifier
static java.lang.String CARTE_BLANCHE
          Mastercard credit card type identifier
static java.lang.String DINERS_CLUB
          Diners club credit card type identifier
static java.lang.String DISCOVER
          Discover card credit card type identifier
static java.lang.String MASTERCARD
          Mastercard credit card type identifier
static java.lang.String UNKNOWN
          Unknown credit card type identifier
static java.lang.String VISA
          Visa credit card type identifier
 
Fields inherited from interface com.ibm.retail.saf.provider.PaymentInfo
CREDIT, DEBIT
 
Method Summary
 java.lang.String getAccountNumber()
          Gets the account number.
 java.lang.String getCardType()
          Gets the card type.
 java.lang.String getExpirationDate()
          Gets the expiration date.
 byte[] getTrackData(int trackNumber)
          Gets the credit card track data.
 void setAccountNumber(java.lang.String accountNumber)
          Sets the account number.
 void setCardType(java.lang.String cardType)
          Sets the card type.
 void setExpirationDate(java.lang.String expDate)
          Sets the expiration date.
 void setTrackData(int trackNumber, byte[] trackData)
          Sets the credit card track data.
 
Methods inherited from interface com.ibm.retail.saf.provider.PaymentInfo
getPaymentType
 
Methods inherited from interface com.ibm.retail.saf.provider.POSInfo
getExtendedAttribute, getExtendedAttributeNames, removeExtendedAttribute, setExtendedAttribute
 

Field Detail

MASTERCARD

public static final java.lang.String MASTERCARD
Mastercard credit card type identifier

See Also:
Constant Field Values

VISA

public static final java.lang.String VISA
Visa credit card type identifier

See Also:
Constant Field Values

AMEX

public static final java.lang.String AMEX
American express credit card type identifier

See Also:
Constant Field Values

DINERS_CLUB

public static final java.lang.String DINERS_CLUB
Diners club credit card type identifier

See Also:
Constant Field Values

DISCOVER

public static final java.lang.String DISCOVER
Discover card credit card type identifier

See Also:
Constant Field Values

CARTE_BLANCHE

public static final java.lang.String CARTE_BLANCHE
Mastercard credit card type identifier

See Also:
Constant Field Values

UNKNOWN

public static final java.lang.String UNKNOWN
Unknown credit card type identifier

See Also:
Constant Field Values
Method Detail

setCardType

public void setCardType(java.lang.String cardType)
Sets the card type.

Parameters:
cardType - the type of credit card

setAccountNumber

public void setAccountNumber(java.lang.String accountNumber)
Sets the account number.

Parameters:
accountNumber - the account number of the card

setExpirationDate

public void setExpirationDate(java.lang.String expDate)
Sets the expiration date.

Parameters:
expDate - the expiration date of the card

getCardType

public java.lang.String getCardType()
Gets the card type.

Returns:
String (or null if unknown)

getAccountNumber

public java.lang.String getAccountNumber()
Gets the account number.

Returns:
account number

getExpirationDate

public java.lang.String getExpirationDate()
Gets the expiration date.

Returns:
String expiration date

setTrackData

public void setTrackData(int trackNumber,
                         byte[] trackData)
Sets the credit card track data.

Data is in "raw" non-decoded format as returned from JavaPOS or OPOS drivers.

Parameters:
trackNumber - identifies the track (1-4) to retrieve
trackData - card track data in raw non-decoded format
Throws:
java.lang.IllegalArgumentException - if the track number is out of range

getTrackData

public byte[] getTrackData(int trackNumber)
Gets the credit card track data.

Data is in "raw" non-decoded format as returned from JavaPOS or OPOS drivers.

Returns a zero length array if no track data is found.

Parameters:
trackNumber - identifies the track (1-4) to retrieve
Returns:
card track data in raw format
Throws:
java.lang.IllegalArgumentException - if the track number is out of range