Class 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 Detail

      • MPaymentValidate

        public MPaymentValidate()
    • 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 - month
        yy - 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 Number
        creditCardType - 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 Code
        creditCardType - 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
      • checkNumeric

        public static String checkNumeric​(String data)
        Check Numeric
        Parameters:
        data - input
        Returns:
        the digits of the data - ignore the rest