' Usage: Returns Boolean indicating whether or not credit card
' number given passes the Luhn Formula (as described in
' ISO/IEC 7812-1:1993). Only numbers and numerical strings
' accepted, remove any spaces and dashes in strings.
' booAcceptCard = CheckCC("4000000000000002")
Dim I, w, x, y
y = 0
CCNo = CStr(CCNo)
'Process digits from right to left, drop last digit if total
'length is even
w = 2 * (len(CCNo) Mod 2)
for I = len(CCNo) - 1 to 1 step -1
x = mid(CCNo, I, 1)
If IsNumeric(x) then
Select Case (I Mod 2) + w
Case 0, 3
'Even Digit - Odd where total length is odd
'(eg. Visa vs. Amx)
y = y + CInt(x)
Case 1, 2
'Odd Digit - Even where total length is odd
' (eg. Visa vs. Amx)
x = CInt(x) * 2
If x > 9 then
'Break the digits (eg. 19 becomes 1 + 9)
y = y + (x \ 10) + (x - 10)
y = y + x
'Return the 10's complement of the total
y = 10 - (y Mod 10)
If y > 9 then y = 0
CheckCC = (CStr(y) = Right$(CCNo, 1))
Thanks to wide spread cloud hosting and innovations small businesses can meet and exceed the legacy systems of goliath corporations.
Explore the freedom to work how you want, with a phone system that will adapt to your evolving needs and actually save you lots of expense—read Get an Enterprise Phone System without High Cost and Complexity.
The article clearly illustrates:
The only hardware you'll need is phone equipment for advanced voice and fax.
How to join all your employees, mobile devices, …
Intelligent N+X Redundancy, Placement Affinities, & Future Proofing in the Virtualized Data Center
Virtualization brought about the ability to simplify business continuity management in IT. Workload portability and data replication capabilities mean that physical infrastructure failures no longer need impact application services, and they can rapidly be recovered even in the event of complete site failure.
However, Enterprises and Service Providers face new challenges ensuring they have enough compute …