1004000000000004 is recognised as
VISA. I doubt it is.
4200000000000000 is recognised as
The code to me looks more or less random, tuned until it passes the tests, not created for matching the specification. The specification clearly states certain combinations of leading digits and length of the number are required. I don't see any mention of number length at all. Probably because you reset the number of digits to 0 on the way, so it's broken.
I did it differently: calculate the checksum, count the digits (without any checks at that point, just counting how often I have to divide by 10 to receive 0!), keep the first two digits in a separate variable. I then decide based on these three numbers (first checksum, then various combinations of the other two).
And yeah, you're doing things more complicated than necessary. For example, you wouldn't need any array if you processed the digits as you separate them (if you wanted, you could do it in a single loop). The expression
(ccArray[ccArrayLength - 4] == 4 && ccArray[ccArrayLength - 4] + 4 == 8) was where I thought the code might be the result of a genetic algorithm, trying random combinations and variations to maximise the fitness function (smiling faces in