lib/active_merchant/billing/gateways/openpay.rb in activemerchant-1.52.0 vs lib/active_merchant/billing/gateways/openpay.rb in activemerchant-1.53.0
- old
+ new
@@ -81,10 +81,20 @@
else
commit(:delete, "customers/#{CGI.escape(customer_id)}/cards/#{CGI.escape(card_id)}", nil, options)
end
end
+ def supports_scrubbing
+ true
+ end
+
+ def scrub(transcript)
+ transcript.
+ gsub(%r((Authorization: Basic )\w+), '\1[FILTERED]').
+ gsub(%r((card_number\\?":\\?")[^"\\]*)i, '\1[FILTERED]').
+ gsub(%r((cvv2\\?":\\?")[^"\\]*)i, '\1[FILTERED]')
+ end
private
def create_post_for_auth_or_purchase(money, creditcard, options)
post = {}
post[:amount] = amount(money)
@@ -189,6 +199,5 @@
}
end
end
end
end
-