2019-09-24 06:44:51 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-12-03 19:23:45 -05:00
|
|
|
module DiscourseSubscriptions
|
2019-09-24 06:44:51 -04:00
|
|
|
module Stripe
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
def set_api_key
|
2019-12-03 19:53:05 -05:00
|
|
|
::Stripe.api_key = SiteSetting.discourse_subscriptions_secret_key
|
2019-09-24 06:44:51 -04:00
|
|
|
end
|
2020-05-28 11:32:57 -04:00
|
|
|
|
|
|
|
def is_stripe_configured?
|
2022-12-29 07:35:06 -05:00
|
|
|
SiteSetting.discourse_subscriptions_public_key.present? &&
|
|
|
|
SiteSetting.discourse_subscriptions_secret_key.present?
|
2020-05-28 11:32:57 -04:00
|
|
|
end
|
2019-09-24 06:44:51 -04:00
|
|
|
end
|
|
|
|
end
|