d-edge / Cardidy

A .net library to identify credit card number and cvv
MIT License
30 stars 12 forks source link
american-express card credit-card cvv dotnet hacktoberfest hacktoberfest-accepted hacktoberfest2022 jcb library luhn luhn-algorithm mastercard visa


cardidy logo

actions build version download license


Cardidy is a .net library to identify credit card number and cvv. Maintained by folks at D-EDGE.

Features

Getting Started as library

Install the 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:

var card = DEdge.Cardidy.Identify("4127540509730813").Single();
Console.WriteLine(card); // print Visa

or in F#:

open System

[<EntryPoint>]
let main _ =
    let isVisa = DEdge.Cardidy.Identify "4127540509730813" |> Seq.head = DEdge.CardType.Visa
    printfn "%b" isVisa
    0

Getting Started working on Cardidy

Let's go :smile:

Note

The library mostly follows the Wikipedia's page: Payment card number. On Cardidy, we made some modifications though:

License

MIT