Method: ActiveMerchant::Billing::TrustCommerceGateway#scrub

Defined in:
lib/active_merchant/billing/gateways/trust_commerce.rb

#scrub(transcript) ⇒ Object



335
336
337
338
339
340
341
342
# File 'lib/active_merchant/billing/gateways/trust_commerce.rb', line 335

def scrub(transcript)
  transcript.
    gsub(%r((Authorization: Basic )\w+), '\1[FILTERED]').
    gsub(%r((&?cc=)\d*(&?)), '\1[FILTERED]\2').
    gsub(%r((&?password=)[^&]+(&?)), '\1[FILTERED]\2').
    gsub(%r((&?cvv=)\d*(&?)), '\1[FILTERED]\2').
    gsub(%r((&?account=)\d*(&?)), '\1[FILTERED]\2')
end