mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-02-17 00:45:08 +00:00
change routes
This commit is contained in:
parent
4eef7131ed
commit
99758dcaa9
@ -1,5 +1,5 @@
|
|||||||
Choice::Engine.routes.draw do
|
Choice::Engine.routes.draw do
|
||||||
get 'stripe' => 'choice#create'
|
get 'stripe' => 'choice#create'
|
||||||
get 'choice-form' => 'choice#index'
|
get 'choice-form' => 'choice#index'
|
||||||
get 'users/:username/choice' => 'choice#show'
|
get 'users/:username/payments' => 'choice#show'
|
||||||
end
|
end
|
||||||
|
6
config/stripe.rb
Normal file
6
config/stripe.rb
Normal file
@ -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
|
# name: choice-plugin
|
||||||
# about: Integrating Discourse with Stripe
|
# about: Integrating Discourse with Stripe
|
||||||
# version: 1.0.0
|
# version: 1.0.1
|
||||||
# authors: Rimian Perkins
|
# authors: Rimian Perkins
|
||||||
# url: https://github.com/choiceaustralia/choice-discourse
|
# url: https://github.com/choiceaustralia/choice-discourse
|
||||||
|
|
||||||
gem 'stripe', '1.58.0'
|
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__)
|
load File.expand_path('../lib/choice-discourse/engine.rb', __FILE__)
|
||||||
|
|
||||||
Discourse::Application.routes.prepend do
|
Discourse::Application.routes.prepend do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user