Utility program to help you generate random (dummy but technically valid) credit cards for testing purposes.
Output file location. It may include ${now} as placeholder and it will be replaced by the execution date time.
creditcard.generator.output-file=generated_credit_cards_${now}.csv
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
creditcard.generator.output-pattern=${pan},${cvv},${expDate},${issuerName}
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: whether it must be luhn compliant or not
creditcard.generator.issuers[0].name=VISA
creditcard.generator.issuers[0].cards=100
creditcard.generator.issuers[0].pan-regex=^4[0-9]{15}$
creditcard.generator.issuers[0].cvv-regex=^[0-9]{3}$
creditcard.generator.issuers[0].exp-date-regex=^(0[1-9]|1[0-2])(2[2-7])$
creditcard.generator.issuers[0].luhn-compliant=true
Compile the project using Maven
mvn clean package
Run it as a Java application either using its internal application.properties (by default it's configured to generate 100 VISA cards)
java -jar target/generator-1.0.jar
or providing an external source with your custom configuration
java -jar target/generator-1.0.jar --spring.config.location=/Your/Path/custom_application.properties
Use this piece of software under your own responsibility.