2017-01-30 12:35:04 +11:00
|
|
|
# name: choice-plugin
|
2017-02-01 13:35:18 +11:00
|
|
|
# about: Integrating Discourse with Stripe
|
2017-02-13 13:55:00 +11:00
|
|
|
# version: 0.3.2
|
2017-01-30 12:35:04 +11:00
|
|
|
# authors: Rimian Perkins
|
2017-02-13 13:55:00 +11:00
|
|
|
# url: https://github.com/choiceaustralia/choice-discourse
|
2017-01-31 13:28:41 +11:00
|
|
|
|
2017-02-01 11:44:55 +11:00
|
|
|
gem 'stripe', '1.58.0'
|
2017-02-01 11:35:21 +11:00
|
|
|
|
2017-02-01 13:35:18 +11:00
|
|
|
Rails.configuration.stripe = {
|
2017-02-02 11:49:22 +11:00
|
|
|
:publishable_key => ENV['STRIPE_PUBLISHABLE_KEY'] || Rails.application.config_for(:stripe)['publishable_key'],
|
|
|
|
|
:secret_key => ENV['STRIPE_SECRET_KEY'] || Rails.application.config_for(:stripe)['secret_key']
|
2017-02-01 13:35:18 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Stripe.api_key = Rails.configuration.stripe[:secret_key]
|
|
|
|
|
|
2017-02-09 12:17:25 +11:00
|
|
|
load File.expand_path('../lib/choice-discourse/engine.rb', __FILE__)
|
2017-01-31 13:28:41 +11:00
|
|
|
|
2017-02-07 13:56:22 +11:00
|
|
|
Discourse::Application.routes.prepend do
|
2017-02-10 15:10:47 +11:00
|
|
|
mount ::Choice::Engine, at: '/'
|
2017-01-31 13:28:41 +11:00
|
|
|
end
|