lib/active_merchant/billing/gateways/epay.rb in activemerchant-1.52.0 vs lib/active_merchant/billing/gateways/epay.rb in activemerchant-1.53.0
- old
+ new
@@ -107,9 +107,21 @@
def credit(money, identification, options = {})
ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
refund(money, identification, options)
end
+ def supports_scrubbing
+ true
+ end
+
+ def scrub(transcript)
+ transcript.
+ gsub(%r((Authorization: Basic )\w+), '\1[FILTERED]').
+ gsub(%r(((?:\?|&)cardno=)\d*(&?)), '\1[FILTERED]\2').
+ gsub(%r((&?cvc=)\d*(&?)), '\1[FILTERED]\2')
+ end
+
+
private
def add_amount(post, money, options)
post[:amount] = amount(money)
post[:currency] = CURRENCY_CODES[(options[:currency] || currency(money)).to_sym]