Skip to content
This repository was archived by the owner on Jan 10, 2018. It is now read-only.

Commit 06e94c2

Browse files
committed
Merge pull request #223 from stripe/jenan-elo-update-bins
Update Elo bins (#222 redux)
2 parents 0ff55d3 + f3a4bc0 commit 06e94c2

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

lib/jquery.payment.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/jquery.payment.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/jquery.payment.coffee

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ $.payment.cards = cards = [
5151
{
5252
type: 'elo'
5353
patterns: [
54-
4011, 438935, 451416, 4576, 457393, 504175, 506699,
55-
5067, 50904, 50905, 50906, 50907, 636297, 636368
54+
4011, 4312, 4389, 4514, 4573, 4576,
55+
5041, 5066, 5067, 509,
56+
6277, 6362, 6363, 650, 6516, 6550
5657
]
5758
format: defaultFormat
5859
length: [16]

test/specs.coffee

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,14 @@ describe 'jquery.payment', ->
219219
topic = $.payment.cardType '4573931212121212'
220220
assert.equal topic, 'elo'
221221

222+
it 'that begins with 431274 should return Elo', ->
223+
topic = $.payment.cardType '4312740000000000'
224+
assert.equal topic, 'elo'
225+
226+
it 'that begins with 650031 should return Elo', ->
227+
topic = $.payment.cardType '6500310000000000'
228+
assert.equal topic, 'elo'
229+
222230
it 'that is not numbers should return null', ->
223231
topic = $.payment.cardType 'aoeu'
224232
assert.equal topic, null
@@ -268,7 +276,6 @@ describe 'jquery.payment', ->
268276
assert.equal($.payment.cardType('3566002020360505'), 'jcb')
269277

270278
assert.equal($.payment.cardType('6363689826438453'), 'elo')
271-
assert.equal($.payment.cardType('6362979826438453'), 'elo')
272279

273280
describe 'Extending the card collection', ->
274281
it 'should expose an array of standard card types', ->

0 commit comments

Comments
 (0)