lib/active_merchant/billing/gateways/adyen.rb
# we recommend setting up merchant-specific endpoints.
# https://docs.adyen.com/developers/api-manual#apiendpoints
we recommend setting up merchant-specific endpoints.
we recommend setting up merchant - specific endpoints .
def add_address(post, options)
        if address = options[:shipping_address]
          post[:deliveryAddress] = {}
          post[:deliveryAddress][:street] = address[:address1] || 'NA'
          post[:deliveryAddress][:houseNumberOrName] = address[:address2] || 'NA'
          post[:deliveryAddress][:postalCode] = address[:zip] if address[:zip]
          post[:deliveryAddress][:city] = address[:city] || 'NA'
          post[:deliveryAddress][:stateOrProvince] = get_state(address)
          post[:deliveryAddress][:country] = address[:country] if address[:country]
        end
        return unless post[:bankAccount]&.kind_of?(Hash) || post[:card]&.kind_of?(Hash)
        if (address = options[:billing_address] || options[:address]) && address[:country]
          post[:billingAddress] = {}
          post[:billingAddress][:street] = address[:address1] || 'NA'
          post[:billingAddress][:houseNumberOrName] = address[:address2] || 'NA'
          post[:billingAddress][:postalCode] = address[:zip] if address[:zip]
          post[:billingAddress][:city] = address[:city] || 'NA'
          post[:billingAddress][:stateOrProvince] = get_state(address)
          post[:billingAddress][:country] = address[:country] if address[:country]
        end
      end
def add_address ( post , options ) if address = options [ :shipping_address ] post [ :deliveryAddress ] = { } post [ :deliveryAddress ] [ :street ] = address [ :address1 ] || 'NA' post [ :deliveryAddress ] [ :houseNumberOrName ] = address [ :address2 ] || 'NA' post [ :deliveryAddress ] [ :postalCode ] = address [ :zip ] if address [ :zip ] post [ :deliveryAddress ] [ :city ] = address [ :city ] || 'NA' post [ :deliveryAddress ] [ :stateOrProvince ] = get_state ( address ) post [ :deliveryAddress ] [ :country ] = address [ :country ] if address [ :country ] end return unless post [ :bankAccount ] &. kind_of? ( Hash ) || post [ :card ] &. kind_of? ( Hash ) if ( address = options [ :billing_address ] || options [ :address ] ) && address [ :country ] post [ :billingAddress ] = { } post [ :billingAddress ] [ :street ] = address [ :address1 ] || 'NA' post [ :billingAddress ] [ :houseNumberOrName ] = address [ :address2 ] || 'NA' post [ :billingAddress ] [ :postalCode ] = address [ :zip ] if address [ :zip ] post [ :billingAddress ] [ :city ] = address [ :city ] || 'NA' post [ :billingAddress ] [ :stateOrProvince ] = get_state ( address ) post [ :billingAddress ] [ :country ] = address [ :country ] if address [ :country ] end end
we recommend setting up merchant-specific endpoints.
we recommend setting up merchant - specific endpoints .
post
<not_specific>
options
<not_specific>