lib/active_merchant/billing/gateways/sage_pay.rb in activemerchant-1.52.0 vs lib/active_merchant/billing/gateways/sage_pay.rb in activemerchant-1.53.0

- old
+ new

@@ -143,9 +143,20 @@ r.process { authorize(100, credit_card, options) } r.process(:ignore_result) { void(r.authorization, options) } end end + def supports_scrubbing + true + end + + def scrub(transcript) + transcript. + gsub(%r((Authorization: Basic )\w+), '\1[FILTERED]'). + gsub(%r((&?CardNumber=)\d+(&?)), '\1[FILTERED]\2'). + gsub(%r((&?CV2=)\d+(&?)), '\1[FILTERED]\2') + end + private def add_reference(post, identification) order_id, transaction_id, authorization, security_key = identification.split(';') add_pair(post, :VendorTxCode, order_id)