Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fake.creditCard.{number,verificationCode,expiry} #75

Open
serhalp opened this issue Jan 11, 2021 · 3 comments
Open

Add fake.creditCard.{number,verificationCode,expiry} #75

serhalp opened this issue Jan 11, 2021 · 3 comments

Comments

@serhalp
Copy link
Contributor

serhalp commented Jan 11, 2021

Add some credit card factories nested under fake.creditCard:

  • number: generate a credit card number conforming to the format of the major U.S. credit card providers
  • (?) verificationCode (or something other name): generate a CVV/CSC/etc. conforming to the format of the major U.S. credit card providers
  • (?) expiry generate a reasonable credit card expiry date in the MM/YYYY string format

Are these last two useful? Either way, I'd propose to nest the CC number method under fake.creditCard.number() for future extensibility.

@risharma
Copy link
Contributor

Additional properties to consider:

  • last4
  • type

@serhalp
Copy link
Contributor Author

serhalp commented Jan 22, 2021

@risharma do we have any current use cases for those?

@risharma
Copy link
Contributor

@risharma do we have any current use cases for those?

https://github.com/goodeggs/garbanzo/blob/master/src/graphql/data_sources/user/index.unit.spec.ts#L206-L208

P.S.: I'm fixing to correctly generate last4 in https://github.com/goodeggs/garbanzo/pull/7766

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants