Class: Spree::BillingIntegration

Inherits:
PaymentMethod
  • Object
show all
Defined in:
app/models/spree/billing_integration.rb

Instance Method Summary collapse

Instance Method Details

#optionsObject



15
16
17
18
19
# File 'app/models/spree/billing_integration.rb', line 15

def options
  options_hash = {}
  preferences.each { |key, value| options_hash[key.to_sym] = value }
  options_hash
end

#providerObject



8
9
10
11
12
13
# File 'app/models/spree/billing_integration.rb', line 8

def provider
  integration_options = options
  ActiveMerchant::Billing::Base.integration_mode = integration_options[:server].to_sym
  integration_options[:test] = true if integration_options[:test_mode]
  @provider ||= provider_class.new(integration_options)
end