SwiftLuhn icon indicating copy to clipboard operation
SwiftLuhn copied to clipboard

Maestro and Rupay card type detection support

Open nagarro-mohitpadalia opened this issue 6 years ago • 1 comments

Can we have the card type detection for maestro and rupay cards.

looks like on line 119 (SwiftLuhn.swift)

for i in CardType.amex.rawValue...CardType.jcb.rawValue {

}

This iteration should go upto CardType.mir to support the card validation for maestro and rupay.

nagarro-mohitpadalia avatar Oct 16 '18 16:10 nagarro-mohitpadalia

@nagarro-mohitpadalia thanks for pointing out the issue! Is this something you'd be able to pick up? When the code was implemented originally, CaseIterable didn't exist. Perhaps we can leverage that?

maxkramer avatar Jan 03 '19 09:01 maxkramer