lib/active_merchant/billing/gateways/payment_express.rb in activemerchant-1.52.0 vs lib/active_merchant/billing/gateways/payment_express.rb in activemerchant-1.53.0
- old
+ new
@@ -120,9 +120,20 @@
def store(credit_card, options = {})
request = build_token_request(credit_card, options)
commit(:validate, request)
end
+ def supports_scrubbing
+ true
+ end
+
+ def scrub(transcript)
+ transcript.
+ gsub(%r((Authorization: Basic )\w+), '\1[FILTERED]').
+ gsub(%r((<CardNumber>)\d+(</CardNumber>)), '\1[FILTERED]\2').
+ gsub(%r((<Cvc2>)\d+(</Cvc2>)), '\1[FILTERED]\2')
+ end
+
private
def use_custom_payment_token?
@options[:use_custom_payment_token]
end