2017-01-30 12:35:04 +11:00
|
|
|
# name: choice-plugin
|
2017-02-01 13:35:18 +11:00
|
|
|
# about: Integrating Discourse with Stripe
|
|
|
|
# version: 0.0.3
|
2017-01-30 12:35:04 +11:00
|
|
|
# authors: Rimian Perkins
|
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 = {
|
|
|
|
:publishable_key => ENV['STRIPE_PUBLISHABLE_KEY'],
|
|
|
|
:secret_key => ENV['STRIPE_SECRET_KEY']
|
|
|
|
}
|
|
|
|
|
|
|
|
Stripe.api_key = Rails.configuration.stripe[:secret_key]
|
|
|
|
|
2017-01-31 13:28:41 +11:00
|
|
|
module ::Choice
|
|
|
|
class Engine < ::Rails::Engine
|
|
|
|
engine_name 'choice'
|
|
|
|
isolate_namespace Choice
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
after_initialize do
|
|
|
|
Discourse::Application.routes.prepend do
|
|
|
|
mount ::Choice::Engine, at: '/choice'
|
|
|
|
end
|
|
|
|
end
|