I’ve been working on an e-commerce system recently (as you may have been able to guess) and to test the credit card integration side of things, I needed some test credit card details of “valid looking” card numbers…
I eventually managed to gather 102 card numbers which passed validation: i.e. the Bank Identification Number [BIN] / Issuer Identification Number [IIN] numbers [the first 7 digits] matched up with the “alleged” card type and the whole card number passed the Luhn algorithm validation.
I must emphasis, before I get thousands of comments, these are TEST credit card numbers and are NOT VALID (I did not get as far as validating that they were theoretically assigned to a bank: just that they were theoretically assigned to a card issue): they are intended to test code in development to ensure that the code recognises the card type correctly and the Luhn algorithm is correct. You should, therefore, be able to use any expiry date or CCV/CSC you like for testing.
You can download these credit card numbers in a BSD released PHP file to make it easier to test with if you wish.
The developmental test card numbers are after the jump (along with details of the original sources):