The CreditCardSwitchGen Generator generates many different types of credit card numbers that can be validated using the Luhn algorithm.
The credit card number generated is determined by the cardName parameter, which can be either a constant or a reference to another Attribute's Generator that generates an appropriate credit card name. The allowed creditCard names are the following:
Note: If a cardName match is not found, then 0000000000000000 is returned.
Example 1: Generate Card Numbers for Discover, MasterCard, and Visa
In this example, two Generators have been linked. The ListGen Generator has been configured to generate the Card Name, which is then used by the CreditCardSwitchGen Generator to generate the actual card number.
ListGen Generator Configuration: