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_splits(post, options)
        return unless split_data = options[:splits]
        splits = []
        split_data.each do |split|
          amount = {
            value: split['amount']['value']
          }
          amount[:currency] = split['amount']['currency'] if split['amount']['currency']
          split_hash = {
            amount: amount,
            type: split['type'],
            reference: split['reference']
          }
          split_hash['account'] = split['account'] if split['account']
          splits.push(split_hash)
        end
        post[:splits] = splits
      end
def add_splits ( post , options ) return unless split_data = options [ :splits ] splits = [ ] split_data . each do | split | amount = { value : split [ 'amount' ] [ 'value' ] } amount [ :currency ] = split [ 'amount' ] [ 'currency' ] if split [ 'amount' ] [ 'currency' ] split_hash = { amount : amount , type : split [ 'type' ] , reference : split [ 'reference' ] } split_hash [ 'account' ] = split [ 'account' ] if split [ 'account' ] splits . push ( split_hash ) end post [ :splits ] = splits end
we recommend setting up merchant-specific endpoints.
we recommend setting up merchant - specific endpoints .
post
<not_specific>
options
<not_specific>