@@ -0,0 +1,1539 @@
+package org.broadleafcommerce.util;%0D%0A%0D%0Apublic class Mod43CheckDigitUtil %7B%0D%0A%0D%0A    private final static String CHARSET = %220123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%25%22;%0D%0A%0D%0A    public static boolean isValidCheckedValue(String value) %7B%0D%0A        boolean valid = false;%0D%0A        if (value != null && !value.isEmpty()) %7B%0D%0A            String code = value.substring(0, value.length() - 1);%0D%0A            char checkDigit = value.substring(value.length() - 1).charAt(0);%0D%0A            try %7B%0D%0A                if (generateCheckDigit(code) == checkDigit) %7B%0D%0A                    valid = true;%0D%0A                %7D%0D%0A            %7D catch (Exception e) %7B%0D%0A                // TODO Auto-generated catch block%0D%0A                e.printStackTrace();%0D%0A            %7D%0D%0A        %7D%0D%0A        return valid;%0D%0A    %7D%0D%0A%0D%0A    public static char generateCheckDigit(String data) %7B%0D%0A        // MOD 43 check digit - take the acsii value of each digit, sum them up, divide by 43. the remainder is the check digit (in ascii)%0D%0A        int sum = 0;%0D%0A        for (int i = 0; i %3C data.length(); ++i) %7B%0D%0A            sum += CHARSET.indexOf(data.charAt(i));%0D%0A        %7D%0D%0A        int remainder = sum %25 43;%0D%0A        return CHARSET.charAt(remainder);%0D%0A    %7D%0D%0A%0D%0A    public static void main(String%5B%5D args) %7B%0D%0A        try %7B%0D%0A            System.out.println(generateCheckDigit(%22TEACH000012345%22));%0D%0A        %7D catch (Exception e) %7B%0D%0A            // TODO Auto-generated catch block%0D%0A            e.printStackTrace();%0D%0A        %7D%0D%0A        System.out.println(isValidCheckedValue(%22TEACH000012345B%22));%0D%0A    %7D%0D%0A%7D%0D%0A

Add check digit util to framework to support making sure someone isn't randomly trying codes, resulting in db calls (e.g. offers)