Sha256: b533a50a09854cb63b6e3e8d1c3833bbea98d29dfcdc7d04dfc326b94f5438ed
Contents?: true
Size: 637 Bytes
Versions: 9
Compression:
Stored size: 637 Bytes
Contents
class BillingIntegration < PaymentMethod validates :name, :presence => true preference :server, :string, :default => 'test' preference :test_mode, :boolean, :default => true def provider integration_options = options ActiveMerchant::Billing::Base.integration_mode = integration_options[:server] integration_options = options integration_options[:test] = true if integration_options[:test_mode] @provider ||= provider_class.new(integration_options) end def options options_hash = {} self.preferences.each do |key,value| options_hash[key.to_sym] = value end options_hash end end
Version data entries
9 entries across 9 versions & 1 rubygems