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