lib/active_merchant/billing/gateways/element.rb in activemerchant-1.60.0 vs lib/active_merchant/billing/gateways/element.rb in activemerchant-1.61.0
- old
+ new
@@ -27,11 +27,11 @@
request = build_soap_request do |xml|
xml.send(action, xmlns: "https://transaction.elementexpress.com") do
add_credentials(xml)
add_payment_method(xml, payment)
- add_transaction(xml, money)
+ add_transaction(xml, money, options)
add_terminal(xml, options)
add_address(xml, options)
end
end
@@ -41,11 +41,11 @@
def authorize(money, payment, options={})
request = build_soap_request do |xml|
xml.CreditCardAuthorization(xmlns: "https://transaction.elementexpress.com") do
add_credentials(xml)
add_payment_method(xml, payment)
- add_transaction(xml, money)
+ add_transaction(xml, money, options)
add_terminal(xml, options)
add_address(xml, options)
end
end
@@ -222,9 +222,20 @@
xml.BillingCity address[:city] if address[:city]
xml.BillingState address[:state] if address[:state]
xml.BillingZipcode address[:zip] if address[:zip]
xml.BillingEmail address[:email] if address[:email]
xml.BillingPhone address[:phone_number] if address[:phone_number]
+ end
+ end
+ if shipping_address = options[:shipping_address]
+ xml.address do
+ xml.ShippingAddress1 shipping_address[:address1] if shipping_address[:address1]
+ xml.ShippingAddress2 shipping_address[:address2] if shipping_address[:address2]
+ xml.ShippingCity shipping_address[:city] if shipping_address[:city]
+ xml.ShippingState shipping_address[:state] if shipping_address[:state]
+ xml.ShippingZipcode shipping_address[:zip] if shipping_address[:zip]
+ xml.ShippingEmail shipping_address[:email] if shipping_address[:email]
+ xml.ShippingPhone shipping_address[:phone_number] if shipping_address[:phone_number]
end
end
end
def parse(xml)