impress/config/initializers/stripe.rb
Matchu 0d6caceb24 improve app infrastructure to make a dev environment easier to reproduce
This commit will require a few changes to the deployment process:
* store AWS credentials in AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY env vars
* store OpenNeo Auth credentials in OPENNEO_AUTH_APP, OPENNEO_AUTH_SERVER, and OPENNEO_AUTH_SECRET env vars

STRIPE_SECRET_KEY and STRIPE_PUBLISHABLE_KEY are now required, too; better have a good .env.
You can always put in dummy values if you have no credentials, though; they only get called up if there's a transaction.

SECRET_TOKEN is now an env var, too, but the production deploy process currently replaces config/initializers/secret_token.rb anyway; this might be the way to go later, though.
2015-07-16 17:44:52 -04:00

6 lines
203 B
Ruby

Rails.configuration.stripe = {
:publishable_key => ENV.fetch('STRIPE_PUBLISHABLE_KEY'),
:secret_key => ENV.fetch('STRIPE_SECRET_KEY')
}
Stripe.api_key = Rails.configuration.stripe[:secret_key]