lib/active_merchant/billing/gateways/card_stream.rb in activemerchant-1.50.0 vs lib/active_merchant/billing/gateways/card_stream.rb in activemerchant-1.51.0

- old
+ new

@@ -107,9 +107,27 @@ post = {} add_pair(post, :xref, authorization) commit('REFUND', post) end + def verify(creditcard, options={}) + MultiResponse.run(:use_first_response) do |r| + r.process { authorize(100, creditcard, 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]'). + gsub(%r((CVV=)\d+), '\1[FILTERED]') + end + private def add_amount(post, money, options) add_pair(post, :amount, amount(money), :required => true) add_pair(post, :currencyCode, currency_code(options[:currency] || currency(money)) || currency_code(self.default_currency))