Class: Spree::BillingIntegration
Instance Method Summary
collapse
active?, available, #destroy, find_with_destroyed, #method_type, #payment_profiles_supported?, #payment_source_class, #provider_class, providers, #source_required?
Instance Method Details
#options ⇒ Object
16
17
18
19
20
21
22
|
# File 'app/models/spree/billing_integration.rb', line 16
def options
options_hash = {}
self.preferences.each do |key,value|
options_hash[key.to_sym] = value
end
options_hash
end
|
#provider ⇒ Object
8
9
10
11
12
13
14
|
# 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 = options
integration_options[:test] = true if integration_options[:test_mode]
@provider ||= provider_class.new(integration_options)
end
|