Giter Club home page Giter Club logo

luhn's Introduction

Calculate/verify check digit (luhn) of credit cards

// Is the card number valid?
var card = '6123451234567893';

luhn(true, pan);	// true


// Calculate check digit

// MII + IIN + "Individual account number"
var incomplete = '612345123456789';

luhn(incomplete);	// "3"

Implemented according to ISO/IEC 7812-1:2015(E) which goes:

  1. Double the value of alternate digits beginning with the first right-hand digit (low order).

  2. Add the individual digits comprising the products obtained in Step 1 to each of the unaffected digits in the original number.

  3. Subtract the total obtained in Step 2 from the next higher number ending in 0 [this is the equivalent of calculating the “tens complement” of the low-order digit (unit digit) of the total]. If the total obtained in Step 2 is a number ending in zero (30, 40, etc.), the check digit is 0.

luhn's People

Contributors

tjconcept avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

luhn's Issues

Card Information Correction

bin list corrections.pdf
Attached is our Visa bin 43772700- that is reporting incorrectly.
I would greatly appreciate your help in making the following corrections, as the incorrect info has created several denials especially during the holiday season.

Correction: for 4377 2700
Network: Visa -- Type: Debit -- Bank: Postel Family CU -- Brand: Traditional PrePaid: No
Country: United States of America

Thank you,
Linda Ryckoff
Postel Family Credit Union
E-mail: [email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.