diff options
author | azul <azul@leap.se> | 2014-07-09 13:25:31 +0200 |
---|---|---|
committer | azul <azul@leap.se> | 2014-07-09 13:25:31 +0200 |
commit | dc740e4311101bf7297996788b25a99edafbe759 (patch) | |
tree | d989456179551fb167f6c41ba4b54bbd4a77a7ac /config/initializers/braintree.rb | |
parent | 19da5429308412c19176733d2b32ccbf2c08df1c (diff) | |
parent | 0cc11ebb609de225fbeacbf80788b992b88b6ce6 (diff) |
Merge pull request #173 from azul/feature/unblock-handles
Allow admins to unblock handles
Diffstat (limited to 'config/initializers/braintree.rb')
-rw-r--r-- | config/initializers/braintree.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/config/initializers/braintree.rb b/config/initializers/braintree.rb new file mode 100644 index 0000000..1eeb393 --- /dev/null +++ b/config/initializers/braintree.rb @@ -0,0 +1,26 @@ +if defined? Braintree + + # + # set logger + # + if APP_CONFIG[:logfile].blank? + require 'syslog/logger' + Braintree::Configuration.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new('webapp')) + else + Braintree::Configuration.logger = Logger.new('log/braintree.log') + end + + # + # You can set these per environment in config/config.yml: + # + # Environment must be one of: :development, :qa, :sandbox, :production + # + if billing = APP_CONFIG[:billing] + if braintree = billing[:braintree] + Braintree::Configuration.environment = braintree[:environment].downcase.to_sym + Braintree::Configuration.merchant_id = braintree[:merchant_id] + Braintree::Configuration.public_key = braintree[:public_key] + Braintree::Configuration.private_key = braintree[:private_key] + end + end +end |