Package org.compiere.model
Class MPaymentValidate
java.lang.Object
org.compiere.model.MPaymentValidate
Payment Validation Routines
- Version:
- $Id: MPaymentValidate.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
- Author:
- Jorg Janke
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
checkNumeric
(String data) Remove all non Digit charactersstatic int
getCreditCardExpMM
(String mmyy) Return Month of Expirestatic int
getCreditCardExpYY
(String mmyy) Return Year of Expirestatic 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 Expire Date?static String
validateCreditCardExp
(String mmyy) Is this a valid Credit Card Expire Date?static String
validateCreditCardNumber
(String creditCardNumber) Validate Credit Card Number.
- Based on LUHN formulastatic String
validateCreditCardNumber
(String creditCardNumber, String creditCardType) Validate Credit Card Number.
- Check Card Type and Lengthstatic String
validateCreditCardVV
(String creditCardVV) Validate Verification Codestatic String
validateCreditCardVV
(String creditCardVV, String creditCardType) Validate Verification Codestatic String
validateRoutingNo
(String routingNo) Validate Routing Number
-
Constructor Details
-
MPaymentValidate
public MPaymentValidate()
-
-
Method Details
-
validateCreditCardExp
Is this a valid Credit Card Expire Date?- Parameters:
mmyy
- Expire in form of mmyy- Returns:
- "" or Error AD_Message
-
getCreditCardExpMM
Return Month of Expire- Parameters:
mmyy
- Expire in form of mmyy- Returns:
- month
-
getCreditCardExpYY
Return Year of Expire- Parameters:
mmyy
- Expire in form of mmyy- Returns:
- year
-
validateCreditCardExp
Is this a valid Credit Card Expire Date?- Parameters:
mm
- monthyy
- year- Returns:
- "" or Error AD_Message
-
validateCreditCardNumber
Validate Credit Card Number.
- Based on LUHN formula- Parameters:
creditCardNumber
- credit card number- Returns:
- "" or Error AD_Message
-
validateCreditCardNumber
Validate Credit Card Number.
- Check Card Type and Length- Parameters:
creditCardNumber
- CC NumbercreditCardType
- CC Type- Returns:
- "" or Error AD_Message
-
validateCreditCardVV
Validate Verification Code- Parameters:
creditCardVV
- CC Verification Code- Returns:
- "" or Error AD_Message
-
validateCreditCardVV
Validate Verification Code- Parameters:
creditCardVV
- CC Verification CodecreditCardType
- CC Type see CC_- Returns:
- "" or Error AD_Message
-
validateRoutingNo
Validate Routing Number- Parameters:
routingNo
- Routing No- Returns:
- "" or Error AD_Message
-
validateAccountNo
Validate Account No- Parameters:
AccountNo
- AccountNo- Returns:
- "" or Error AD_Message
-
validateCheckNo
Validate Check No- Parameters:
CheckNo
- CheckNo- Returns:
- "" or Error AD_Message
-
checkNumeric
Remove all non Digit characters- Parameters:
data
- input- Returns:
- the digits of the data - ignore the rest
-