1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/lib/stripe/helper.rb

22 lines
562 B
Ruby

# frozen_string_literal: true
# Stripe payement gateway
module Stripe; end
## Provides various methods around the Stripe payment gateway
class Stripe::Helper
class << self
## Is the Stripe gateway enabled?
def enabled?
return false unless Setting.get('online_payment_module')
return false unless Setting.get('payment_gateway') == 'stripe'
res = true
%w[stripe_public_key stripe_secret_key stripe_currency].each do |pz_setting|
res = false unless Setting.get(pz_setting).present?
end
res
end
end
end