Jump to content
php.lv forumi

Credit Card Checker code


Artuuro_lv

Recommended Posts

Kāpēc nav php?

 

Kautkā dikti garš kods, un atbalsta maz kartes.

Reku daudz īsāks, universālās (der vairāk kartēm), un php valodā: http://planzero.org/code/bits/viewcode.php?src=luhn_check.phps

Tas der sekojošām kartēm: http://en.wikipedia.org/wiki/Credit_card_number#Card_prefixes_and_lengths (tām kurām uzrakstīts Luhn algorithm pie Validation kolonnas).

Atliek tikai garumu un prefiksu pārbaudi pielikt klāt (vai arī ņemt jau gatavu skriptu)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...