lib/active_merchant/billing/gateways/wirecard.rb
# Includes the address to the transaction-xml
Includes the address to the transaction-xml
Includes the address to the transaction - xml
def add_address(xml, address)
        return if address.nil?
        xml.tag! 'CORPTRUSTCENTER_DATA' do
	        xml.tag! 'ADDRESS' do
	          xml.tag! 'Address1', address[:address1]
	          xml.tag! 'Address2', address[:address2] if address[:address2]
	          xml.tag! 'City', address[:city]
	          xml.tag! 'ZipCode', address[:zip]
	          if address[:state] =~ /[A-Za-z]{2}/ && address[:country] =~ /^(us|ca)$/i
	            xml.tag! 'State', address[:state].upcase
	          end
	          xml.tag! 'Country', address[:country]
            xml.tag! 'Phone', address[:phone] if address[:phone] =~ VALID_PHONE_FORMAT
	          xml.tag! 'Email', address[:email]
	        end
	      end
      end
def add_address ( xml , address ) return if address . nil? xml . tag! 'CORPTRUSTCENTER_DATA' do xml . tag! 'ADDRESS' do xml . tag! 'Address1' , address [ :address1 ] xml . tag! 'Address2' , address [ :address2 ] if address [ :address2 ] xml . tag! 'City' , address [ :city ] xml . tag! 'ZipCode' , address [ :zip ] if address [ :state ] =~ / [A-Za-z]{2} / && address [ :country ] =~ / ^(us|ca)$ /i xml . tag! 'State' , address [ :state ] . upcase end xml . tag! 'Country' , address [ :country ] xml . tag! 'Phone' , address [ :phone ] if address [ :phone ] =~ VALID_PHONE_FORMAT xml . tag! 'Email' , address [ :email ] end end end
Includes the address to the transaction-xml
Includes the address to the transaction - xml
xml
<not_specific>
address
<not_specific>