Skip to content
This repository was archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #110 from isaacfreeman/feature/suppress_logging
Browse files Browse the repository at this point in the history
Set Braintree log level as a gateway preference
  • Loading branch information
adammathys authored Jun 8, 2018
2 parents 03b4fe9 + 63e7b23 commit d23a6af
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/models/solidus_paypal_braintree/gateway.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def gateway_options
merchant_id: preferred_merchant_id,
public_key: preferred_public_key,
private_key: preferred_private_key,
logger: Braintree::Configuration.logger.clone
logger: logger
}
end

Expand Down Expand Up @@ -261,6 +261,12 @@ def reusable_sources(order)

private

def logger
Braintree::Configuration.logger.clone.tap do |logger|
logger.level = Rails.logger.level
end
end

def dollars(cents)
Money.new(cents).dollars
end
Expand Down

0 comments on commit d23a6af

Please sign in to comment.