Refactor CreditCard.generate