Press "Enter" to skip to content

Richy's Random Ramblings

Techy: Test Credit and Debit Card Numbers

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):

Javascript: innerHTML, Select menu and Internet Explorer

I’ve just had cause to pull in the contents of a SELECT menu using Javascript to help build up a webpage on the fly using the DOM. I had to do it this was a there were potentially 4,000 items for a select html menu (and so the user had to narrow it down by pre-selecting another menu) and then pulling the list of items from the server. The were also some optgroups in there (making using JSON or XML that bit harder) and there could, potentially, be some formatting information. Oh – and there could be 1 or 100 of these menus on the webpage.

The way I initally worked it, and which worked in Firefox, was to use:
document.getElementById(‘menuname’).innerHTML=fetchedHTML;
(menuname being the id of the Domscripting gave me a clue and I eventually finished up with:
document.getElementById(‘menuname’).parentNode.innerHTML = ‘‘;
(i.e. recreating the entire select menu from scratch). It’s not nice, but it works!

Influential Twitterer

It appears I’m as important as my ego has been telling me. I’ve been on Twitter less than 48 hours and already famous well-known people such as Robert Scoble, Martin Belam (aka Currybet), Chris Prillio, Danny Choo, The Planet (the web server company), Isabel Wang, Neil Turner, Katy Bairstow and even His Holiness the 14th Dalai Lama has joined my army of minions and are following and listening to my every word.

If all those famous names are following me, I’m obviously very important and you should be following me too (/me does mesmerising hand-waving movements).

Does God really exist? It’ll be down to the Advertising Standards Authority to decide…

As you may be aware, the British Humanist Association’s “There is probably no God” bus advert campaign was reported to the UK’s Advertising Standards Authority for being “offensive and denigratory to people of faith” and “challenged whether the ad was misleading because the advertiser would not be able to substantiate its claim that God “probably” does not exist” (see the ASA’s update where they said it was “not in breach of the advertising code” and “the ad was an expression of the advertiser’s opinion”) in the BHA’s “There’s probably no god. Now stop worrying and enjoy your life” bus adverts.

I now wonder if the ASA will receive, and take action, against the Russian Orthodox Church, the Christian Party and Trinitarian Bible Society for stating “There definitely is a God”, “There definitely is a God; so join the Christian Party and enjoy your life.” and “There IS a God, BELIEVE. Don’t worry and enjoy your life.” in their own bus adverts. Source: BBC News and Daily Mail.

I just hope that all of those three organisations can, with their statement of fact (“definitely is a god” and “There IS a God”), can substantiate the existence of God to the Advertising Standards board – and the fact that their advertisement would be offensive and denigratory to people of other faiths and those who do not believe in the existence of God.