Method for Luhn algorithm