Skip to content

Latest commit

 

History

History
60 lines (43 loc) · 2.48 KB

README.md

File metadata and controls

60 lines (43 loc) · 2.48 KB

CreditCard Utils

CreditCard Toolbox.

Build Status Quality Gate Status Coverage Status Known Vulnerabilities


Credit Card Generator

####Utility class to help you generate random (dummy but technically valid) credit cards for testing purposes.

Credit card issuers list to be generated including:

  • Name: issuer name
  • Cards: number of cards to be generated
  • PAN Regex: regular expression to generate the PAN value
  • CVV Regex: regular expression to generate the CVV value
  • Expiration Date Regex: regular expression to generate the expiration date value
  • Luhn Compliant: a LuhnCompliance functional interface instance (See also LuhnAlgorithmValidator)
creditCardIssuers[0].name=VISA
creditCardIssuers[0].cards=100
creditCardIssuers[0].panRegex=^4[0-9]{15}$
creditCardIssuers[0].cvvRegex=^[0-9]{3}$
creditCardIssuers[0].expDateRegex=^(0[1-9]|1[0-2])(2[2-7])$
creditCardIssuers[0].luhnCompliant=(pan) -> luhnAlgorithmValidator.validate(pan)

Output pattern. It may include the following placeholders:

  • ${pan} - it will be replaced by the generated pan
  • ${cvv} - it will be replaced by the generated cvv
  • ${expDate} - it will be replaced by the generated expiration date
  • ${issuerName} - it will be replaced by the issuer name
outputPattern=${pan},${cvv},${expDate},${issuerName}

Luhn Algorithm Validator

####Utility class to help you validate PAN's luhn algorithm compliance.

No configuration required. (See also Luhn Algorithm).


Reference docs

Payment Card Number

Luhn Algorithm


Disclaimer

Use this piece of software under your own responsibility.