Sha256: 66dce47755f5affc006f05fd21f391849a6ecdedbc0f1fc4c1568fbc4174e1f1

Contents?: true

Size: 877 Bytes

Versions: 25

Compression:

Stored size: 877 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, :maestro]
    base.homepage_url = 'http://www.braintreepaymentsolutions.com'
    base.display_name = 'Braintree'
    base.default_currency = 'USD'
    base.currencies_without_fractions = %w(BIF CLP DJF GNF JPY KMF KRW LAK PYG RWF UGX VND VUV XAF XOF XPF)
  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

25 entries across 25 versions & 2 rubygems

Version Path
activemerchant-1.103.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.102.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.101.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.100.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.99.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.98.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
active_accountability_merchant-1.97.1 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.97.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.96.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.95.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.94.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.93.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.92.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.91.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.90.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.89.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.88.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.87.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.86.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb
activemerchant-1.85.0 lib/active_merchant/billing/gateways/braintree/braintree_common.rb