cardutils

package
v1.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2025 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AmexRegex          = regexp.MustCompile("^3[47]")
	MasterCardRegex    = regexp.MustCompile("^(?:5[1-6]|222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)")
	VisaRegex          = regexp.MustCompile("^4")
	DinersClubRegex    = regexp.MustCompile("^3(?:0[0-5]|[68][0-9])")
	RouteClubRegex     = regexp.MustCompile("^(2014|2149)")
	DiscoverRegex      = regexp.MustCompile("^6(?:011|5[0-9]{2})")
	JcbRegex           = regexp.MustCompile("^(?:2131|1800|35\\d{3})")
	VoyagerRegex       = regexp.MustCompile("^70888[5-9]")
	WexRegex           = regexp.MustCompile("^(?:690046|707138)")
	FuelmanRegex       = regexp.MustCompile("^707649[0-9]")
	FleetwideRegex     = regexp.MustCompile("^707685[0-9]")
	StoredValueRegex   = regexp.MustCompile("^(?:600649|603261|603571|627600|639470)")
	ValueLinkRegex     = regexp.MustCompile("^(?:601056|603225)")
	HeartlandGiftRegex = regexp.MustCompile("^(?:502244|627720|708355)")
	UnionPayRegex      = regexp.MustCompile("^(?:62[0-8]|81[0-8])")
)

Functions

func GetBaseCardType

func GetBaseCardType(cardType string) string

func IsFleet

func IsFleet(cardType, pan string) bool

func MapCardType

func MapCardType(pan string) string

func ParseTrackData

func ParseTrackData(paymentMethod abstractions.ITrackData) abstractions.ITrackData

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL