2017-02-16 16:43:21 +11:00
|
|
|
|
2017-02-16 18:13:57 +11:00
|
|
|
if File.exist?('config/stripe.yml')
|
2017-02-16 16:43:21 +11:00
|
|
|
Rails.configuration.stripe = {
|
2017-02-16 18:13:57 +11:00
|
|
|
:publishable_key => Rails.application.config_for(:stripe)['publishable_key'],
|
|
|
|
:secret_key => Rails.application.config_for(:stripe)['secret_key']
|
2017-02-16 16:43:21 +11:00
|
|
|
}
|
|
|
|
else
|
|
|
|
Rails.configuration.stripe = {
|
2017-02-16 18:13:57 +11:00
|
|
|
:publishable_key => ENV['STRIPE_PUBLISHABLE_KEY'],
|
|
|
|
:secret_key => ENV['STRIPE_SECRET_KEY']
|
2017-02-16 16:43:21 +11:00
|
|
|
}
|
|
|
|
end
|
2017-02-14 10:28:07 +11:00
|
|
|
|
|
|
|
Stripe.api_key = Rails.configuration.stripe[:secret_key]
|