payform icon indicating copy to clipboard operation
payform copied to clipboard

Add Dinersclub 309 prefix validation

Open ghost opened this issue 6 years ago • 6 comments

It solves the issue https://github.com/jondavidjohn/payform/issues/56

according to this document https://en.wikipedia.org/wiki/Payment_card_number Dinersclub International could starts with 309 Thanks, Francesco

ghost avatar Dec 04 '18 13:12 ghost

Hi @FrancescoColonna! This is good! We've recently made changes to our BIN patterns and documented everything under CARDRULES.md. Do you mind adding tests in test/validateCardNumber_spec.coffee and possible source associated to the Wikipedia page?

ddayguerrero avatar Dec 04 '18 19:12 ddayguerrero

Hi @ddayguerrero i've added a basic test in test/validateCardNumber_spec.coffee and a reference to Wikipedia in CARDRULES.md Please let me know if i can help in some other ways. Thanks for your job! Francesco

ghost avatar Dec 05 '18 10:12 ghost

Looks good to me! Before we move on, can we omit all generated distribution files from the list of staged changes? (dist/payform.js and dist/payform.min.js)

ddayguerrero avatar Dec 05 '18 21:12 ddayguerrero

Hi @ddayguerrero i've removed dist/*.js files from staged changes. Please let me know if everything it's ok. Thanks, Francesco

frappacchio avatar Dec 06 '18 20:12 frappacchio

Sorry, I wasn't clear earlier. What I meant is to keep the files on disk, but remove the changes from the git change log. Something along the lines of doing git rm --cached

We should end up with 3 files changed:

src/payform.coffee
test/validateCardNumber_spec.coffee
CARDRULES.md

I truly appreciate your time and effort in creating this PR, but it is only best that we follow the guidelines shared by @jondavidjohn

ddayguerrero avatar Dec 07 '18 02:12 ddayguerrero

Will close as soon #59 is merged

ddayguerrero avatar Dec 12 '18 19:12 ddayguerrero