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

Set Braintree log level as a gateway preference #110

Merged
merged 1 commit into from
Jun 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -53,7 +53,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 @@ -231,6 +231,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