SwiftLuhn icon indicating copy to clipboard operation
SwiftLuhn copied to clipboard

Debit/Credit card validation port of the Luhn Algorithm in Swift

Results 9 SwiftLuhn issues
Sort by recently updated
recently updated
newest added

The PR should summarize what was changed and why. Here are some questions to help you if you're not sure: - What behavior was changed? Added `Unionpay` card type. Checklist...

The PR should summarize what was changed and why. Here are some questions to help you if you're not sure: - What behavior was changed? Added Brazilian Cards, Converted to...

do { let cardType = try SwiftLuhn.cardType(for: cc_number_to_check!) switch cardType{ case .visa: using this code can't use cardType. 'cardType' is inaccessible due to 'internal' protection level i added public: public...

Hi @maxkramer The PR fixes the issue #18 The caseIterable protocol works for enumerations without associated values, so I have added a simple solution to get the count of all...

A few resources (https://www.cybersource.com/developers/getting_started/test_and_manage/best_practices/card_type_id/, https://www.freeformatter.com/credit-card-number-generator-validator.html, https://en.wikipedia.org/wiki/Payment_card_number) on credit card validation mention that JCB cards have IIN ranges of 3528–3589. Currently, the regex that the library to validate JCB cards is...

bug
more-info

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...

bug
help wanted

new card type in Turkey ^9792\d{12}$

enhancement
help wanted

* Added Elo, Hipercard and Aura (almost all code is from Eduardo Bocato, I just made it compatible with swift3) * Improve Example project to show Card Type on the...