lib/active_merchant/billing/gateways/payment_express.rb in activemerchant-1.119.0 vs lib/active_merchant/billing/gateways/payment_express.rb in activemerchant-1.120.0
- old
+ new
@@ -84,12 +84,12 @@
def credit(money, identification, options = {})
ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
refund(money, identification, options)
end
- def verify(money, payment_source, options = {})
- request = build_purchase_or_authorization_request(money, payment_source, options)
+ def verify(payment_source, options = {})
+ request = build_purchase_or_authorization_request(nil, payment_source, options)
commit(:validate, request)
end
# Token Based Billing
#
@@ -152,11 +152,11 @@
add_billing_token(result, payment_source)
else
add_credit_card(result, payment_source)
end
- add_amount(result, money, options)
+ add_amount(result, money, options) if money
add_invoice(result, options)
add_address_verification_data(result, options)
add_optional_elements(result, options)
add_ip(result, options)
result
@@ -232,11 +232,11 @@
def add_address_verification_data(xml, options)
address = options[:billing_address] || options[:address]
return if address.nil?
- xml.add_element('EnableAvsData').text = 1
- xml.add_element('AvsAction').text = 1
+ xml.add_element('EnableAvsData').text = options[:enable_avs_data] || 1
+ xml.add_element('AvsAction').text = options[:avs_action] || 1
xml.add_element('AvsStreetAddress').text = address[:address1]
xml.add_element('AvsPostCode').text = address[:zip]
end