braintree / credit-card-type

A library for determining credit card type
MIT License
985 stars 154 forks source link

Adding RuPay Card #132

Closed avinashjsap closed 3 years ago

avinashjsap commented 3 years ago

Added RuPay to Built-in card type as it is being popularly used in India

https://en.wikipedia.org/wiki/RuPay https://en.wikipedia.org/wiki/Payment_card_number

crookedneighbor commented 3 years ago

Do you have official documentation from RuPay?

avinashjsap commented 3 years ago

Hello Blade,

I could not find the card numbers mentioned in the official documentation This is the official website -> https://www.npci.org.in/what-we-do/rupay/product-overview And But from the Brand mark guidelines(https://www.npci.org.in/PDF/npci/brand-center/RuPay-Revised-Guideline-4_30th%20July.pdf) we could guarantee that it starts with “60” and “65”

avinashjsap commented 3 years ago

Do we have the official documentation for other cards? If so could you please share them ?

crookedneighbor commented 3 years ago

We have documentation from the partners that Braintree works with for our own credit card processing, but we do not have documentation for card brands that Braintree does not directly support (and we don't have the bandwidth to chase it down from the card issuers on our own).

I'm happy for this module to support cards that Braintree doesn't specifically process for, but we need to be careful that the card ranges are accurate, therefore, we need official documentation for the possible ranges.

If that's impossible, and you still want to include RuPay, our official recommendation is to use the methods that allows you to add/modify card types. https://github.com/braintree/credit-card-type#adding-card-types

nishanthpappula commented 3 years ago

Hi @avinashjsap @crookedneighbor, I am using this package in my project for fetching and validating the card details. I noticed that it doesn't work for the Rupay card type. I just saw that Pull Request has already been raised for Rupay integration. Is there any plan of merging this PR so that it can solve our Rupay related issues.

avinashjsap commented 3 years ago

@nishanthpappula , as @crookedneighbor commented, You can create custom cards using the methods provided and feel free to use the Rupay Card regex.

Abhishek0067 commented 3 years ago

RuPay card BIN numbers starting with 60, 652, 653, 654, 81, 82, 508, 3538, 3561.

you can see RuPay BIN numbers here - https://www.desidime.com/deals/bookmyshow-flat-75-off-on-payment-above-100-using-rupay-platinum-debit-card-flat-250-off-on-250-using-rupay-credit-card-flat-500-off-on-500-using-rupay-select-card

nishanthpappula commented 3 years ago

@avinashjsap @Abhishek0067 Thanks for the quick response. It's working with the approach suggested.

Abhishek0067 commented 3 years ago

RuPay card BIN numbers starting with 60, 652, 653, 654, 81, 82, 508, 3538, 3561.

you can see RuPay BIN numbers here - https://www.desidime.com/deals/bookmyshow-flat-75-off-on-payment-above-100-using-rupay-platinum-debit-card-flat-250-off-on-250-using-rupay-credit-card-flat-500-off-on-500-using-rupay-select-card

Just an update RuPay card BIN number now also start with 653. In future also RuPay will start BIN number 654.