lib/active_merchant/billing/gateways/payflow.rb in activemerchant-1.76.0 vs lib/active_merchant/billing/gateways/payflow.rb in activemerchant-1.77.0
- old
+ new
@@ -43,10 +43,17 @@
def refund(money, reference, options = {})
commit(build_reference_request(:credit, money, reference, options), options)
end
def verify(payment, options={})
- authorize(0, payment, options)
+ if credit_card_type(payment) == 'Amex'
+ MultiResponse.run(:use_first_response) do |r|
+ r.process { authorize(100, payment, options) }
+ r.process(:ignore_result) { void(r.authorization, options) }
+ end
+ else
+ authorize(0, payment, options)
+ end
end
def verify_credentials
response = void("0")
response.params["result"] != "26"