3 ms·
Many of us from the pre-stripe era have implemented Luhn once or twice I'd say, very often in Javascript and web scripting languages! However, you really should
by contingencies 11y ago
Many of us from the pre-stripe era have implemented Luhn once or twice I'd say, very often in Javascript and web scripting languages! However, you really should avoid re-implementing this sort of thing, and particularly additional credit card checks as it's easy to make spurious assumptions (eg. credit card prefix should equal country of address of credit card, or of mailing address) which are in fact invalid. This stuff prevents actual sales and frustrates your users.
For a slightly out there and arguably more interesting financial checksum algorithm, and one that is actually amazingly effective, do some statistics on mod97's performance. Realizing how good it was, a few years back for a cool hack in my IBAN library I wrote a mistranscription error suggestion system, which plays off the strengths of mod97. See https://github.com/globalcitizen/php-iban/blob/master/trunk/php-iban.php#L320 https://github.com/globalcitizen/php-iban/blob/master/trunk/... and https://github.com/globalcitizen/php-iban/blob/master/trunk/mistranscriptions.txt https://github.com/globalcitizen/php-iban/blob/master/trunk/... - for a quick hack, it's amazingly effective.
PS. I am available for remote gigs doing creative or challenging stuff in finance-land at the moment, if anyone appreciates this sort of thing.
- Jugurtha 11y agoThis threw me 14 years back. First year high-schooler hanging out on Moroccan websites of pure html with a black background and rotating skeletons (funny fact: it was called c00l-hack), and this stuff was there. Right with phreaking, lock-picking and that kind of things. They had a good community over there and we didn't. I still have some of those files I suppose (downloaded on a dozen floppy disks I carried with me everywhere from cyber café to the other).
- DanBC 11y agoI remember "credit card generators" - they'd create a credit card number to pass luhn checking. For a few years people could get Compuserve access by using a fake number and fake details.
- k8tte 11y agoI remember this. One (in sweden) could dial a freephone bbs number and enter a fake credit card only to get a temporary working account, that worked for like 24 hours or until you hung up. Helped me from being killed by parents for huge phone bills around 1995