Giter Club home page Giter Club logo

banks-db's People

Contributors

achedeuzot avatar achkasov avatar ai avatar amio avatar aran112000 avatar baitun avatar c0nfusecode avatar dependabot[bot] avatar drugoi avatar dylanlacey avatar emilianox avatar fnnzzz avatar grigorii-zander avatar hz-labs avatar keksike avatar kemalturk avatar lamo2k123 avatar lari4 avatar lewiseason avatar linda-rian avatar luchanso avatar madyankin avatar maraisr avatar oguzzkilic avatar olegman avatar sashaegorov avatar sea-unicorn avatar suxxes avatar vladdenisov avatar zhurbin 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

banks-db's Issues

Add more popular USA banks

Seems like we need to add more popular USA banks by our self. Only in this case users will trust in us and contribute.

Reddit users expect that we have AmEx, Chase, BofA, and Capital One banks.

We need to find these BINs somehow.

Add full usage example

We need usage example for PostCSS (postcss-banks-db, postcss-contrast) and Inline CSS.

Suggest the card type within the card number prefix data.

I have a China Merchants Bank - Dual-Currency Credit Card, prefix is 5187 10, the card type is UnionPay AND MasterCard.

I find the code, types rule is write in type.js, and one card number just have one type.

So, I suggest the card type write in the card number prefix data, like:

banks/%country%/bankName.json

{
  ...,
  "prefixes": {
    "518710": {
      "types": ["UnionPay", "MasterCard"]
    },
    "622609": {
      "types": "UnionPay"
    }
  }
}

Credit Card, Savings Deposit Card, Prepaid card ...

How about to detect this?

Usually, One card is the one category of Credit Card(CC), Savings Deposit Card(DC), Prepaid Card(PC), Semi Credit Card(SCC)

Bank Additions

Hi there,

Two British additions here...
TSB (FYI, Lloyds TSB have split in to two separate banks)
476367
476368

Barclaycard
492910

const in for-in

if (bank) {
    for (const el in bank) {
      result[el] = bank[el];
    }
  }

const can be used in for-in loop, so this line broke Firefox.

This issue is really critical, because 0.7 can’t be used in any production build with Firefox.

Separate banks file by countries

There are many banks that work internationally, we need to have one bank-json for bank operating in each country.

For example, there are Sberbank in CZ in BY and in RU. There is VTB in RU and BY. There are Alfabank in RU and BY.

I suggest that we create directory for each country in banks folder and put ambigous jsons here.
Non-ambigous jsons may be left where they are. We also need to adjust build scripts?

What do you think? Will PR with those changes be welcome?

Some of Sberbank prefixes are ambiguous

According to http://bins.pro/search?action=searchbins&bins=54690&bank=&country= bin 54690is ambiguous (546900 is HOIUPANK bank). I found all sberbank bins by this search request http://bins.pro/search?action=searchbins&bins=&bank=SBERBANK&country=RU - except 5 first bins all others are sberbank. And from here we can find all 5 and 6-digit bins for sberbank. I'm ready to make pull request which will fix present ambiguous bins and add all known from this database.

Sort prefixes

We should sort prefixes in build script. It will increase readability and allow to faster check, that prefix is already in database.

Deliver db updates without updating npm

Thanks for awesome project. I think it will be even better, if we write a web service to get bank data by AJAX request.

Some sites don't get updates of npm packages during a few years - development is stopped.
They don't receive updates (e.g. just added card prefix of bank from Russian TOP-10).

Just request with a BIN is not the best way. In future by mistake it can cause sending full card number. API for downloading full DB on page loading is better (gzip work everywhere now) and then search as now - with no requests.

@ramoona What do you think? Do you need help?

tool for grab bin codes

Hi, I wrote a small tool here (just for fun), which parses bin codes of banks and allows you filter them by country and bank name.

Perhaps this will help you include more banks.
A little later I will do a pullback with a list of Ukrainian.

link: https://github.com/fnnzzz/macGRUBer

What about not banks cards?

Like Payoneer, Revolut, ePayments.

I could to add few Payoneer and Revolut numbers but it's not Banks right?

Normalize colors

Some colors use upper #FFF, some lower case #fff. We should add it to linter and normallize current data.

Add flag to distinguish Closed/Defunt banks

There are examples of banks that no longer issue cards to customers and banks with revoked licenses. I suggest adding some flag to json to mark those banks, for example "defunct: true"

Consider removing manual require of each individual banks/*.json

See index.js:

const banks = [
  require('./banks/alfabank'),
  require('./banks/raiffeisen'),
  require('./banks/sberbank'),
  require('./banks/tinkoff'),
  require('./banks/vtb24'),
  require('./banks/mdm'),
];

Those requires bloats the main file(and it will grow in future) and create unnecessary step when adding new banks. We can either move those requires to banks/index.js (1) or just import everything from /banks directory while iterating over its files(2). Either way will make at first lint test unnecessary(YAY).

Add result.code

Right now banksDB usage code is quite big:

let bank = banksDB(uuser.card);
if ( bank.name ) {
    return 'is-' + bank.country + '-' + bank.name;
} else {
    return 'is-other';
}

If in findBank function we will generate code = bank.country + '-' + bank.name and add it to result.code we can simplify this usage code to:

return 'is-' + (banksDB(uuser.card).code || 'other');

Add LCL (France) Visa

// banks/fr/lcl.json
  {
    "name": "LCL",
    "prefixes": [
      497203
    ],
    "country": "fr",
    "localTitle": "LCL",
    "engTitle": "LCL",
    "url": "https://particuliers.secure.lcl.fr/",
    "color": "#263F92"
  }

Add indent to autogenerated indexes

We need

module.exports = [
  require('./alfabank'),
  require('./citibank'),
  require('./mdm'),
  require('./raiffeisen'),
  require('./rocketbank'),
  require('./sberbank'),
  require('./siab'),
  require('./tinkoff'),
  require('./vtb24'),
  require('./yandex')
];

instead of:

module.exports = [
require('./alfabank'),
require('./citibank'),
require('./mdm'),
require('./raiffeisen'),
require('./rocketbank'),
require('./sberbank'),
require('./siab'),
require('./tinkoff'),
require('./vtb24'),
require('./yandex')
];

Add ING Direct (France) Gold Mastercard

// banks/fr/ingdirect.json
  {
    "name": "ING Direct",
    "prefixes": [
      513625
    ],
    "country": "fr",
    "localTitle": "ING Direct",
    "engTitle": "ING Direct",
    "url": "http://www.ingdirect.fr/",
    "color": "#FF6200"
  }

Add new Rocketbank

New Rockebank card uses different backend bank, so we need to add new BIN: 5321 30

Insert a last new line to generated indexes

Project .editorconfig tells that every file should contains \n at the end. It is a good practice, because cat package.json will have better output.

But autogerenerated banks/index.js and banks/xx/index.js miss this \n. GitHub even highlight it in diff.

Outdated banks db in demo

Looks like db in demo is outdated. For example bin 424204 is already present in database, but shows as 'unknown'.

Lint country

After #12 we should update linter to check conformity of country folder name and bank country.

Add Epayments Mastercard

Prefix: 5283 93

Epayments is just a provider. The card issued by PSI-Pay Ltd. This is how the card looks like:

epayments-russia

Error on undefined bank card

First issue from in-the-wild usage on Amplifr.

Sometimes cardNumber become to undefined in app code. And when we send undefined to banksDB error raises: Undefined method toString in undefined.

Of course, it is not a banksDB issue and can be fixed by simple user.card || '' code. But we should care about user. More love and peace =^_^=.

I suggest to add some something like cardNumber || '' into findBank function.

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.