diff --git a/.env.test b/.env.test index a52a6b10b4..bb625a4d02 100644 --- a/.env.test +++ b/.env.test @@ -2,7 +2,7 @@ # Override locally with `.env.test.local` SECRET_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -STRIPE_SECRET_TEST_API_KEY="bogus_key" +STRIPE_INSTANCE_SECRET_KEY="bogus_key" STRIPE_CUSTOMER="bogus_customer" STRIPE_ACCOUNT="bogus_account" STRIPE_CLIENT_ID="bogus_client_id" diff --git a/config/initializers/stripe.rb b/config/initializers/stripe.rb index 37871eb00a..19c782762a 100644 --- a/config/initializers/stripe.rb +++ b/config/initializers/stripe.rb @@ -13,13 +13,8 @@ module Stripe end Rails.application.reloader.to_prepare do - Stripe.api_key = if Rails.env.test? || ENV["CI"] - ENV.fetch('STRIPE_SECRET_TEST_API_KEY', nil) - else - ENV.fetch('STRIPE_INSTANCE_SECRET_KEY', nil) - end - - Stripe.publishable_key = ENV.fetch('STRIPE_INSTANCE_PUBLISHABLE_KEY', nil) - Stripe.client_id = ENV.fetch('STRIPE_CLIENT_ID', nil) - Stripe.endpoint_secret = ENV.fetch('STRIPE_ENDPOINT_SECRET', nil) + Stripe.api_key = ENV['STRIPE_INSTANCE_SECRET_KEY'] + Stripe.publishable_key = ENV['STRIPE_INSTANCE_PUBLISHABLE_KEY'] + Stripe.client_id = ENV['STRIPE_CLIENT_ID'] + Stripe.endpoint_secret = ENV['STRIPE_ENDPOINT_SECRET'] end