change routes
This commit is contained in:
parent
4eef7131ed
commit
99758dcaa9
|
@ -1,5 +1,5 @@
|
|||
Choice::Engine.routes.draw do
|
||||
get 'stripe' => 'choice#create'
|
||||
get 'choice-form' => 'choice#index'
|
||||
get 'users/:username/choice' => 'choice#show'
|
||||
get 'users/:username/payments' => 'choice#show'
|
||||
end
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
Rails.configuration.stripe = {
|
||||
: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']
|
||||
}
|
||||
|
||||
Stripe.api_key = Rails.configuration.stripe[:secret_key]
|
|
@ -1,18 +1,11 @@
|
|||
# name: choice-plugin
|
||||
# about: Integrating Discourse with Stripe
|
||||
# version: 1.0.0
|
||||
# version: 1.0.1
|
||||
# authors: Rimian Perkins
|
||||
# url: https://github.com/choiceaustralia/choice-discourse
|
||||
|
||||
gem 'stripe', '1.58.0'
|
||||
|
||||
Rails.configuration.stripe = {
|
||||
: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']
|
||||
}
|
||||
|
||||
Stripe.api_key = Rails.configuration.stripe[:secret_key]
|
||||
|
||||
load File.expand_path('../lib/choice-discourse/engine.rb', __FILE__)
|
||||
|
||||
Discourse::Application.routes.prepend do
|
||||
|
|
Loading…
Reference in New Issue