Class MPaymentValidate

java.lang.Object
org.compiere.model.MPaymentValidate

public class MPaymentValidate extends Object
Payment Validation Routines
Version:
$Id: MPaymentValidate.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
Author:
Jorg Janke
  • Constructor Details

    • MPaymentValidate

      public MPaymentValidate()
  • Method Details

    • validateCreditCardExp

      public static String validateCreditCardExp(String mmyy)
      Is this a valid Credit Card Expire Date?
      Parameters:
      mmyy - Expire in form of mmyy
      Returns:
      "" or Error AD_Message
    • getCreditCardExpMM

      public static int getCreditCardExpMM(String mmyy)
      Return Month of Expire
      Parameters:
      mmyy - Expire in form of mmyy
      Returns:
      month
    • getCreditCardExpYY

      public static int getCreditCardExpYY(String mmyy)
      Return Year of Expire
      Parameters:
      mmyy - Expire in form of mmyy
      Returns:
      year
    • validateCreditCardExp

      public static String validateCreditCardExp(int mm, int yy)
      Is this a valid Credit Card Expire 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 Verification Code
      Parameters:
      creditCardVV - CC Verification Code
      Returns:
      "" or Error AD_Message
    • validateCreditCardVV

      public static String validateCreditCardVV(String creditCardVV, String creditCardType)
      Validate Verification 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)
      Remove all non Digit characters
      Parameters:
      data - input
      Returns:
      the digits of the data - ignore the rest