lib/active_merchant/billing/gateways/secure_net.rb in activemerchant-1.77.0 vs lib/active_merchant/billing/gateways/secure_net.rb in activemerchant-1.78.0
- old
+ new
@@ -59,12 +59,23 @@
def credit(money, authorization, options = {})
ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
refund(money, authorization, options)
end
+ def supports_scrubbing?
+ true
+ end
+ def scrub(transcript)
+ transcript.
+ gsub(%r((<CARDNUMBER>)\d+(</CARDNUMBER>))i, '\1[FILTERED]\2').
+ gsub(%r((<CARDCODE>)\d+(</CARDCODE>))i, '\1[FILTERED]\2').
+ gsub(%r((<SECUREKEY>).+(</SECUREKEY>))i, '\1[FILTERED]\2')
+ end
+
private
+
def commit(request)
xml = build_request(request)
url = test? ? self.test_url : self.live_url
data = ssl_post(url, xml, "Content-Type" => "text/xml")
response = parse(data)
@@ -253,6 +264,5 @@
end
end
end
end
-