User Tools

Site Tools


credit_card_numbers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
credit_card_numbers [2025/06/22 09:58] – created frchriscredit_card_numbers [2025/06/22 11:15] (current) – [Generating Credit Card Numbers] frchris
Line 1: Line 1:
 ====== Credit Card Numbers ====== ====== Credit Card Numbers ======
  
-Credit card numbers are not random.  They use something called [[https://en.wikipedia.org/wiki/Luhn_algorithm|Luhn' Algorithm]] to make sure customer or clerk hasn't made mistake typing in the long 16 digit number Here is a video that explains [[https://en.wikipedia.org/wiki/Luhn_algorithm|how it works]]+Credit card numbers are not random.  In addition to bank and account number there are extra digits.  
 +a customer or a clerk hasn't made a mistake typing in the long 16 digit number. In fact even magnetic strip fail, and errors in transmission from a chip reading devices can also fail to send the correct number.  
 + 
 +They use something called [[https://en.wikipedia.org/wiki/Luhn_algorithm|Luhn' Algorithm]] to detect errors. Here is [[https://www.youtube.com/watch?v=Djt-KjciW20|video that explains how to see if credit card is valid]]. 
 + 
 + 
 + 
 +For this lab, we will write and test the validity of a 16 digit credit card. 
 + 
 +===== Generating Credit Card Numbers===== 
 + 
 + 
 +The practice of TDD (Test Driven Development) starts with writing the code to test our Validity software. 
 +This means we need to get some valid and invalid numbers and see if our code can spot the difference. 
 + 
 +Here is a [[https://www.youtube.com/watch?v=biFXw8zIyHs|video that explains what we need to do]] 
 + 
 + 
 +===== Checking with Luhn's ===== 
 + 
 + 
 +===== Finding a Better Way ===== 
 + 
 +[[https://www.youtube.com/watch?v=yaoSdFAL4UY|The Verhoeff-Gumm Check Digit Algorithm]] 
  
credit_card_numbers.1750600704.txt.gz · Last modified: 2025/06/22 09:58 by frchris

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki