Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/d-edge/cardidy
A .net library to identify credit card number and cvv
https://github.com/d-edge/cardidy
american-express card credit-card cvv dotnet hacktoberfest hacktoberfest-accepted hacktoberfest2022 jcb library luhn luhn-algorithm mastercard visa
Last synced: 2 months ago
JSON representation
A .net library to identify credit card number and cvv
- Host: GitHub
- URL: https://github.com/d-edge/cardidy
- Owner: d-edge
- License: mit
- Created: 2021-09-13T10:05:30.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-19T16:43:55.000Z (almost 1 year ago)
- Last Synced: 2024-12-01T16:43:45.097Z (3 months ago)
- Topics: american-express, card, credit-card, cvv, dotnet, hacktoberfest, hacktoberfest-accepted, hacktoberfest2022, jcb, library, luhn, luhn-algorithm, mastercard, visa
- Language: C#
- Homepage:
- Size: 149 KB
- Stars: 35
- Watchers: 8
- Forks: 12
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
![]()
Cardidy is a .net library to identify credit card number and cvv. Maintained by folks at [D-EDGE](https://www.d-edge.com/).
## Features
* Easy to use
* Easy to extend
* Easy to maintain (Regex-free)
* Up-to-date with Wikipedia
* Check with the Luhn's algorithm
* Can check for Cvv
* Can guess anonymized credit card
* Can guess truncated creditcard card
* Support for Visa credit card
* Support for Jcb credit card
* Support for Amex credit card
* Support for Discover credit card
* Support for MasterCard credit card
* Support for more...## Getting Started as library
Install the [DEdge.Cardidy](https://www.nuget.org/packages/DEdge.Cardidy) NuGet package:
PM> Install-Package DEdge.Cardidy
Alternatively you can also use the .NET CLI to add the packages:
dotnet add package DEdge.Cardidy
Next create a .net application and use DEdge.Cardidy:
```csharp
var card = DEdge.Cardidy.Identify("4127540509730813").Single();
Console.WriteLine(card); // print Visa
```or in F#:
```fsharp
open System[]
let main _ =
let isVisa = DEdge.Cardidy.Identify "4127540509730813" |> Seq.head = DEdge.CardType.Visa
printfn "%b" isVisa
0
```## Getting Started working on Cardidy
- `git clone git@github.com:d-edge/Cardidy.git`
- `cd Cardidy`
- `dotnet test`Let's go :smile:
## Note
The library mostly follows the Wikipedia's page: [Payment card number](https://en.wikipedia.org/wiki/Payment_card_number#Issuer_identification_number_(IIN)). On Cardidy, we made some modifications though:
- Diners Club International is known as Diners Club
## License
[MIT](https://raw.githubusercontent.com/d-edge/cardidy/main/LICENSE)