paynet.utils
Class ModulusCheck

java.lang.Object
  extended by paynet.utils.ModulusCheck

public class ModulusCheck
extends java.lang.Object


Constructor Summary
ModulusCheck()
           
 
Method Summary
static void mod9(java.lang.String routingNumber)
          performs mod-9 check on a routing number - throws exception if the expected check digit (the last digit) is not as expected WEIGHTS: 3,7,1,3,7,1,3,7 ROUTING NUMBER with a check digit in the 9th position: example: 072401006 0*3 + 7*7 + 2*1 + 4*3 + 0*7 + 1*1 + 0*3 + 0*7 = 64 The check digit is the number which , when added to the sum produces a number ending in zero 64 + 6 = 70 The check digit in this case is 6
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModulusCheck

public ModulusCheck()
Method Detail

mod9

public static void mod9(java.lang.String routingNumber)
                 throws PaynetException
performs mod-9 check on a routing number - throws exception if the expected check digit (the last digit) is not as expected WEIGHTS: 3,7,1,3,7,1,3,7 ROUTING NUMBER with a check digit in the 9th position: example: 072401006 0*3 + 7*7 + 2*1 + 4*3 + 0*7 + 1*1 + 0*3 + 0*7 = 64 The check digit is the number which , when added to the sum produces a number ending in zero 64 + 6 = 70 The check digit in this case is 6

Parameters:
routingNumber -
Throws:
PaynetException