CreditCardHelper 1.0.3

There is a newer version of this package available.
See the version list below for details.
Install-Package CreditCardHelper -Version 1.0.3
dotnet add package CreditCardHelper --version 1.0.3
<PackageReference Include="CreditCardHelper" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CreditCardHelper --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CreditCardHelper, 1.0.3"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install CreditCardHelper as a Cake Addin
#addin nuget:?package=CreditCardHelper&version=1.0.3

// Install CreditCardHelper as a Cake Tool
#tool nuget:?package=CreditCardHelper&version=1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

CreditCardHelper

CreditCardHelper helps you working with creditcards. Validating the numbers and find the type of card. Verifying card numbers through the Luhn algorithm. It even can check whether there is a number hidden in text.

Nuget Package: https://www.nuget.org/packages/CreditCardHelper

Usage

LuhnValidator
var cardIsValid = CreditCardHelper.LuhnValidator.Validate("5105105105105100");
// = true
var cardIsValid2 = CreditCardHelper.LuhnValidator.Validate("123");
// = false
ValidateCreditCard
var cardType = CreditCardHelper.ValidateCreditCard.GetCardTypeByNumber("5105105105105100");
// = CreditCardType.MasterCard
var cardType2 = CreditCardHelper.ValidateCreditCard.GetCardTypeByNumber("123");
// = CreditCardType.Unknown
Validator
var textContainsCC = CreditCardHelper.Validator.TextContainsCreditCard("This is a text with 5105-1051-0510-5100 in it");
// = true
var textContainsCC2 = CreditCardHelper.Validator.TextContainsCreditCard("51st Street number 05 box 1051");
// = false
var textContainsCC3 = CreditCardHelper.Validator.TextContainsCreditCard("Thi5105s is 1051 a te0510xt with5100 in it");
// = true
  • .NETStandard 2.0

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

Version Downloads Last updated
1.1.3 850 7/17/2020
1.1.2 193 6/22/2020
1.1.1 192 6/9/2020
1.1.0 189 6/9/2020
1.0.5 209 6/3/2020
1.0.4 189 6/2/2020
1.0.3 193 5/28/2020