lib/active_merchant/billing/gateways/moneris_us.rb in activemerchant-1.48.0 vs lib/active_merchant/billing/gateways/moneris_us.rb in activemerchant-1.49.0

- old
+ new

@@ -36,9 +36,16 @@ @avs_enabled = options[:avs_enabled] options = { :crypt_type => 7 }.merge(options) super end + def verify(creditcard_or_datakey, options = {}) + MultiResponse.run(:use_first_response) do |r| + r.process { authorize(100, creditcard_or_datakey, options) } + r.process(:ignore_result) { capture(0, r.authorization) } + end + end + # Referred to as "PreAuth" in the Moneris integration guide, this action # verifies and locks funds on a customer's card, which then must be # captured at a later date. # # Pass in +order_id+ and optionally a +customer+ parameter.