add stripe gem

This commit is contained in:
Rimian Perkins 2019-09-11 19:18:30 +10:00
parent 2e3cdb0dcf
commit b97e9b91c2
1 changed files with 12 additions and 2 deletions

View File

@ -1,11 +1,21 @@
# name: Discourse Patrons # name: Discourse Patrons
# about: Integrates Stripe into Discourse to allow visitors to make donations # about: Integrates Stripe into Discourse to allow visitors to make payments
# version: 1.0.0 # version: 1.0.0
# url: https://github.com/rimian/discourse-patron # url: https://github.com/rimian/discourse-patrons
# authors: Rimian Perkins # authors: Rimian Perkins
enabled_site_setting :discourse_patrons_enabled enabled_site_setting :discourse_patrons_enabled
gem 'stripe', '5.1.0'
register_html_builder('server:before-head-close') do
"<script src='https://js.stripe.com/v3/'></script>"
end
extend_content_security_policy(
script_src: ['https://js.stripe.com/v3/']
)
after_initialize do after_initialize do
load File.expand_path('../lib/discourse_patrons/engine.rb', __FILE__) load File.expand_path('../lib/discourse_patrons/engine.rb', __FILE__)
load File.expand_path('../config/routes.rb', __FILE__) load File.expand_path('../config/routes.rb', __FILE__)