-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
refactor: source Stripe API keys from ENV vars #5771
refactor: source Stripe API keys from ENV vars #5771
Conversation
Signed-off-by: Will Lopez <[email protected]>
Signed-off-by: Will Lopez <[email protected]>
Note: integration tests pass locally, they fail in Circle CI due to a known issue with in-memory Mongo, that should hopefully be fixed soon. |
@mikemurray @aldeed I have verified that I amble to checkout on this branch, so we can move forward and merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seem to work, but I had one comment. If I don't have a STRIPE_API_KEY
in the .env
file the app fails to start with an error form envalid
.
Not sure what we want to do here, but if you don't have a stripe key, or don't intend to use stripe, the app shouldn't fail to start. Also might need some docs or put an example in .env.example
. Of course in the future, this plugin would be split out of the API into its own package so whatever we do now is probably temporary.
Signed-off-by: Will Lopez <[email protected]>
@mikemurray good point, I have added a placeholder key to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One suggestion @willopez
Signed-off-by: Will Lopez <[email protected]>
@mikemurray @aldeed Removed unnecessary code and re-tested with storefront and can confirm checkout with Stripe works. |
Signed-off-by: Will Lopez <[email protected]>
f7b5413
to
9c9fb8f
Compare
Signed-off-by: Will Lopez <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Resolves #5767
Impact: minor
Type: refactor
Issue
The Stripe API key needs to be sourced from environment variables for security considerations.
Solution
Source the secret Stripe API key from environment variables. Some settings were removed as they are no longer needed.
Removed:
Why
Packages
collection as it's not needed and we are working on removing it