def is_mod10(self):
        double = 0
        total = 0
        for i in range(len(self.number) - 1, -1, -1):
            for c in str((double + 1) * int(self.number[i])):
                total = total + int(c)
            double = (double + 1) % 2
        return (total % 10) == 0
Returns True if number is valid according to mod10.
dataset/ETHPy150Open spookylukey/django-paypal/paypal/pro/creditcard.py/CreditCard.is_mod10