com.ibm.retail.saf.provider
Class CreditCard

java.lang.Object
  |
  +--java.util.AbstractMap
        |
        +--java.util.HashMap
              |
              +--com.ibm.retail.saf.provider.POSInfoImpl
                    |
                    +--com.ibm.retail.saf.provider.CreditCard
All Implemented Interfaces:
java.lang.Cloneable, CreditPaymentInfo, java.util.Map, PaymentInfo, POSInfo, java.io.Serializable

public class CreditCard
extends POSInfoImpl
implements CreditPaymentInfo

Contains information required to process a credit card payment.

See Also:
Serialized Form

Field Summary
(package private)  byte paymentType
           
 
Fields inherited from class java.util.HashMap
 
Fields inherited from class java.util.AbstractMap
 
Fields inherited from interface com.ibm.retail.saf.provider.CreditPaymentInfo
AMEX, CARTE_BLANCHE, DINERS_CLUB, DISCOVER, MASTERCARD, UNKNOWN, VISA
 
Fields inherited from interface com.ibm.retail.saf.provider.PaymentInfo
CREDIT, DEBIT
 
Constructor Summary
CreditCard()
           
 
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 getPaymentType()
           
 byte[] getTrackData(int trackNumber)
          Gets the credit card track data.
 void setAccountNumber(java.lang.String acct)
          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[] track)
          Sets the credit card track data.
 
Methods inherited from class com.ibm.retail.saf.provider.POSInfoImpl
getExtendedAttribute, getExtendedAttributeNames, removeExtendedAttribute, setExtendedAttribute
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.retail.saf.provider.POSInfo
getExtendedAttribute, getExtendedAttributeNames, removeExtendedAttribute, setExtendedAttribute
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

paymentType

byte paymentType
Constructor Detail

CreditCard

public CreditCard()
Method Detail

setCardType

public void setCardType(java.lang.String cardType)
Description copied from interface: CreditPaymentInfo
Sets the card type.

Specified by:
setCardType in interface CreditPaymentInfo
Parameters:
cardType - the type of credit card

setAccountNumber

public void setAccountNumber(java.lang.String acct)
Description copied from interface: CreditPaymentInfo
Sets the account number.

Specified by:
setAccountNumber in interface CreditPaymentInfo
Parameters:
acct - the account number of the card

setExpirationDate

public void setExpirationDate(java.lang.String expDate)
Description copied from interface: CreditPaymentInfo
Sets the expiration date.

Specified by:
setExpirationDate in interface CreditPaymentInfo
Parameters:
expDate - the expiration date of the card

getCardType

public java.lang.String getCardType()
Description copied from interface: CreditPaymentInfo
Gets the card type.

Specified by:
getCardType in interface CreditPaymentInfo
Returns:
String (or null if unknown)

getAccountNumber

public java.lang.String getAccountNumber()
Description copied from interface: CreditPaymentInfo
Gets the account number.

Specified by:
getAccountNumber in interface CreditPaymentInfo
Returns:
account number

getExpirationDate

public java.lang.String getExpirationDate()
Description copied from interface: CreditPaymentInfo
Gets the expiration date.

Specified by:
getExpirationDate in interface CreditPaymentInfo
Returns:
String expiration date

setTrackData

public void setTrackData(int trackNumber,
                         byte[] track)
Description copied from interface: CreditPaymentInfo
Sets the credit card track data.

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

Specified by:
setTrackData in interface CreditPaymentInfo
Parameters:
trackNumber - identifies the track (1-4) to retrieve
track - card track data in raw non-decoded format

getTrackData

public byte[] getTrackData(int trackNumber)
Description copied from interface: CreditPaymentInfo
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.

Specified by:
getTrackData in interface CreditPaymentInfo
Parameters:
trackNumber - identifies the track (1-4) to retrieve
Returns:
card track data in raw format

getPaymentType

public byte getPaymentType()
Specified by:
getPaymentType in interface PaymentInfo