Method: ActiveMerchant::Billing::PayTraceGateway#scrub

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

#scrub(transcript) ⇒ Object



168
169
170
171
172
173
174
175
176
177
# File 'lib/active_merchant/billing/gateways/pay_trace.rb', line 168

def scrub(transcript)
  transcript.
    gsub(%r((Authorization: Bearer )[a-zA-Z0-9:_]+), '\1[FILTERED]').
    gsub(%r(("credit_card\\?":{\\?"number\\?":\\?")\d+), '\1[FILTERED]').
    gsub(%r(("csc\\?":\\?")\d+), '\1[FILTERED]').
    gsub(%r(("username\\?":\\?")\w+@+\w+.+\w+), '\1[FILTERED]').
    gsub(%r(("username\\?":\\?")\w+), '\1[FILTERED]').
    gsub(%r(("password\\?":\\?")\w+), '\1[FILTERED]').
    gsub(%r(("integrator_id\\?":\\?")\w+), '\1[FILTERED]')
end