Package org.compiere.model
Class MPaymentValidate
- java.lang.Object
-
- org.compiere.model.MPaymentValidate
-
public class MPaymentValidate extends Object
Payment Validion Routines- Version:
- $Id: MPaymentValidate.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
- Author:
- Jorg Janke
-
-
Constructor Summary
Constructors Constructor Description MPaymentValidate()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
checkNumeric(String data)
Check Numericstatic int
getCreditCardExpMM(String mmyy)
Return Month of Expstatic int
getCreditCardExpYY(String mmyy)
Return Year of Expstatic String
validateAccountNo(String AccountNo)
Validate Account Nostatic String
validateCheckNo(String CheckNo)
Validate Check Nostatic String
validateCreditCardExp(int mm, int yy)
Is this a valid Credit Card Exp Date?static String
validateCreditCardExp(String mmyy)
Is this a valid Credit Card Exp Date?static String
validateCreditCardNumber(String creditCardNumber)
Validate Credit Card Numberstatic String
validateCreditCardNumber(String creditCardNumber, String creditCardType)
Validate Credit Card Numberstatic String
validateCreditCardVV(String creditCardVV)
Validate Validation Codestatic String
validateCreditCardVV(String creditCardVV, String creditCardType)
Validate Validation Codestatic String
validateRoutingNo(String routingNo)
Validate Routing Number
-
-
-
Method Detail
-
validateCreditCardExp
public static String validateCreditCardExp(String mmyy)
Is this a valid Credit Card Exp Date?- Parameters:
mmyy
- Exp in form of mmyy- Returns:
- "" or Error AD_Message
-
getCreditCardExpMM
public static int getCreditCardExpMM(String mmyy)
Return Month of Exp- Parameters:
mmyy
- Exp in form of mmyy- Returns:
- month
-
getCreditCardExpYY
public static int getCreditCardExpYY(String mmyy)
Return Year of Exp- Parameters:
mmyy
- Exp in form of mmyy- Returns:
- year
-
validateCreditCardExp
public static String validateCreditCardExp(int mm, int yy)
Is this a valid Credit Card Exp Date?- Parameters:
mm
- monthyy
- year- Returns:
- "" or Error AD_Message
-
validateCreditCardNumber
public static String validateCreditCardNumber(String creditCardNumber)
Validate Credit Card Number. - Based on LUHN formula- Parameters:
creditCardNumber
- credit card number- Returns:
- "" or Error AD_Message
-
validateCreditCardNumber
public static String validateCreditCardNumber(String creditCardNumber, String creditCardType)
Validate Credit Card Number. - Check Card Type and Length- Parameters:
creditCardNumber
- CC NumbercreditCardType
- CC Type- Returns:
- "" or Error AD_Message
-
validateCreditCardVV
public static String validateCreditCardVV(String creditCardVV)
Validate Validation Code- Parameters:
creditCardVV
- CC Verification Code- Returns:
- "" or Error AD_Message
-
validateCreditCardVV
public static String validateCreditCardVV(String creditCardVV, String creditCardType)
Validate Validation Code- Parameters:
creditCardVV
- CC Verification CodecreditCardType
- CC Type see CC_- Returns:
- "" or Error AD_Message
-
validateRoutingNo
public static String validateRoutingNo(String routingNo)
Validate Routing Number- Parameters:
routingNo
- Routing No- Returns:
- "" or Error AD_Message
-
validateAccountNo
public static String validateAccountNo(String AccountNo)
Validate Account No- Parameters:
AccountNo
- AccountNo- Returns:
- "" or Error AD_Message
-
validateCheckNo
public static String validateCheckNo(String CheckNo)
Validate Check No- Parameters:
CheckNo
- CheckNo- Returns:
- "" or Error AD_Message
-
-