lib/active_merchant/billing/gateways/wirecard.rb in activemerchant-1.52.0 vs lib/active_merchant/billing/gateways/wirecard.rb in activemerchant-1.53.0
- old
+ new
@@ -124,10 +124,21 @@
else
commit(:authorization_check, money, options)
end
end
+ def supports_scrubbing
+ true
+ end
+
+ def scrub(transcript)
+ transcript.
+ gsub(%r((Authorization: Basic )\w+), '\1[FILTERED]').
+ gsub(%r((<CreditCardNumber>)\d+(</CreditCardNumber>)), '\1[FILTERED]\2').
+ gsub(%r((<CVC2>)[^<]+(</CVC2>)), '\1[FILTERED]\2')
+ end
+
private
def clean_description(description)
description.to_s.slice(0,32).encode("US-ASCII", invalid: :replace, undef: :replace, replace: '?')
end
@@ -415,6 +426,5 @@
"Basic " << Base64.encode64(credentials).strip
end
end
end
end
-