CreditCard Toolbox.
####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}
####Utility class to help you validate PAN's luhn algorithm compliance.
No configuration required. (See also Luhn Algorithm).
Use this piece of software under your own responsibility.