JIDE 3.5.15

com.jidesoft.field.creditcard
Class JCB

java.lang.Object
  extended by com.jidesoft.field.creditcard.JCB
All Implemented Interfaces:
CardIssuer

public class JCB
extends Object
implements CardIssuer

AmericanExpress credit card Issuer.


Field Summary
static String NAME
          Issuer Name
static int VAILDATE_ERROR_NOT_START_WITH_2131_OR_1800
           
static int VAILDATE_ERROR_NOT_START_WITH_3
          Code to be returned when card number is not start with 3
 
Fields inherited from interface com.jidesoft.field.creditcard.CardIssuer
VAILDATE_ERROR_WRONG_LENGTH, VAILDATE_SUCCESS
 
Constructor Summary
JCB()
           
 
Method Summary
 Icon getIcon()
          Get card issuer's icon
 String getName()
          Get card issuer's name
 int isCardNumberValid(String cardNumber)
          Card number length should be 16, Issuer Identifier should be "3xxxx".
 void setIcon(Icon icon)
          set card issuer's icon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
Issuer Name

See Also:
Constant Field Values

VAILDATE_ERROR_NOT_START_WITH_3

public static final int VAILDATE_ERROR_NOT_START_WITH_3
Code to be returned when card number is not start with 3

See Also:
Constant Field Values

VAILDATE_ERROR_NOT_START_WITH_2131_OR_1800

public static final int VAILDATE_ERROR_NOT_START_WITH_2131_OR_1800
See Also:
Constant Field Values
Constructor Detail

JCB

public JCB()
Method Detail

isCardNumberValid

public int isCardNumberValid(String cardNumber)
Card number length should be 16, Issuer Identifier should be "3xxxx".

Specified by:
isCardNumberValid in interface CardIssuer
Parameters:
cardNumber - number to be checked
Returns:
0-the number is valid, other-invalid

getName

public String getName()
Get card issuer's name

Specified by:
getName in interface CardIssuer
Returns:
card issuer's name

getIcon

public Icon getIcon()
Get card issuer's icon

Specified by:
getIcon in interface CardIssuer
Returns:
card issuer's icon

setIcon

public void setIcon(Icon icon)
set card issuer's icon

Parameters:
icon - card issuer's icon

JIDE 3.5.15