lib/active_merchant/billing/gateways/trust_commerce.rb in activemerchant-1.52.0 vs lib/active_merchant/billing/gateways/trust_commerce.rb in activemerchant-1.53.0
- old
+ new
@@ -290,9 +290,20 @@
}
commit('unstore', parameters)
end
+ def supports_scrubbing
+ true
+ end
+
+ def scrub(transcript)
+ transcript.
+ gsub(%r((Authorization: Basic )\w+), '\1[FILTERED]').
+ gsub(%r((&?cc=)\d*(&?)), '\1[FILTERED]\2').
+ gsub(%r((&?cvv=)\d*(&?)), '\1[FILTERED]\2')
+ end
+
private
def add_payment_source(params, source)
if source.is_a?(String)
add_billing_id(params, source)
else