Sha256: f36b966034cc2325583395f473e4981fb1661494492c7325f389914a7567d78d

Contents?: true

Size: 759 Bytes

Versions: 24

Compression:

Stored size: 759 Bytes

Contents

module BraintreeCommon
  def self.included(base)
    base.supported_countries = %w(US CA AD AT BE BG HR CY CZ DK EE FI FR GI DE GR GG HU IS IM IE IT JE LV LI LT LU MT MC NL NO PL PT RO SM SK SI ES SE CH TR GB SG HK MY AU NZ)
    base.supported_cardtypes = [:visa, :master, :american_express, :discover, :jcb, :diners_club]
    base.homepage_url = 'http://www.braintreepaymentsolutions.com'
    base.display_name = 'Braintree'
    base.default_currency = 'USD'
  end

  def supports_scrubbing
    true
  end

  def scrub(transcript)
    return "" if transcript.blank?
    transcript.
      gsub(%r((Authorization: Basic )\w+), '\1[FILTERED]').
      gsub(%r((&?ccnumber=)\d*(&?)), '\1[FILTERED]\2').
      gsub(%r((&?cvv=)\d*(&?)), '\1[FILTERED]\2')
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
activemerchant-1.78.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.77.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.76.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.75.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.74.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.73.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.72.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.71.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.70.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.69.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.68.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.67.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.66.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.65.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.64.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.63.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.62.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.61.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.60.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.59.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb