lib/active_merchant/billing/gateways/wirecard.rb
# Includes the whole transaction data (payment, creditcard, address)
Includes the whole transaction data (payment, creditcard, address)
Includes the whole transaction data ( payment creditcard address )
def add_transaction_data(xml, action, money, options = {})
        options[:action] = action
        options[:order_id] ||= generate_unique_id
        transaction_type = action.to_s.upcase
        xml.tag! "FNC_CC_#{transaction_type}" do
          xml.tag! 'FunctionID', options[:description] || 'Test dummy FunctionID'
          xml.tag! 'CC_TRANSACTION' do
            xml.tag! 'TransactionID', options[:order_id]
            if [:authorization, :purchase].include?(action)
              add_invoice(xml, money, options)
              add_creditcard(xml, options[:credit_card])
              add_address(xml, options[:billing_address])
            elsif action == :capture_authorization
              xml.tag! 'GuWID', options[:authorization] if options[:authorization]
            end
          end
        end
      end
def add_transaction_data ( xml , action , money , options = { } ) options [ :action ] = action options [ :order_id ] ||= generate_unique_id transaction_type = action . to_s . upcase xml . tag! "FNC_CC_#{transaction_type}" do xml . tag! 'FunctionID' , options [ :description ] || 'Test dummy FunctionID' xml . tag! 'CC_TRANSACTION' do xml . tag! 'TransactionID' , options [ :order_id ] if [ :authorization , :purchase ] . include? ( action ) add_invoice ( xml , money , options ) add_creditcard ( xml , options [ :credit_card ] ) add_address ( xml , options [ :billing_address ] ) elsif action == :capture_authorization xml . tag! 'GuWID' , options [ :authorization ] if options [ :authorization ] end end end end
Includes the whole transaction data (payment, creditcard, address)
Includes the whole transaction data ( payment creditcard address )
# TODO: require order_id instead of auto-generating it if not supplied # TODO: OPTIONAL, check which param should be used here
xml
<not_specific>
action
<not_specific>
money
<not_specific>
options
<not_specific>