LuhnCreditCardVerificator 1.0.2
dotnet add package LuhnCreditCardVerificator --version 1.0.2
NuGet\Install-Package LuhnCreditCardVerificator -Version 1.0.2
<PackageReference Include="LuhnCreditCardVerificator" Version="1.0.2" />
paket add LuhnCreditCardVerificator --version 1.0.2
#r "nuget: LuhnCreditCardVerificator, 1.0.2"
// Install LuhnCreditCardVerificator as a Cake Addin #addin nuget:?package=LuhnCreditCardVerificator&version=1.0.2 // Install LuhnCreditCardVerificator as a Cake Tool #tool nuget:?package=LuhnCreditCardVerificator&version=1.0.2
You may be using Credit Card Verificator
As the name of the package assumes, the verification is based on the Luhn algorithm. It allows you to check very easy if numbers of a credit card are valid or not.
Usage
Very easy to use with the method : IsVerifCard(string) : return a boolean
using LuhnCreditCardVerificator;
bool result = LuhnVerificator.IsVerifCard("6011 0009 9013 9424");
If the response is True
so the card is OK.
If the response is False
so the card is WRONG
Note : Don't need to clean or remove special characters before to call the method with the client card in parameter. You can directly pass the string. If there is an error, the response will just be false.
with an example :
using LuhnCreditCardVerificator;
public void CheckClientCard()
{
// call the method to verify
bool result = LuhnVerificator.IsVerifCard("6011 0009 9013 9424");
// interpret the result
if(result)
Console.WriteLine("The client's credit card number is verify");
else
Console.WriteLine("the client's credit card is wrong");
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.