Sha256: a12a00d091e38729e715a74c9eadf4168662594d0eb70c5754f8eaa1dfb75958
Contents?: true
Size: 632 Bytes
Versions: 144
Compression:
Stored size: 632 Bytes
Contents
module Spree 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].to_sym integration_options[:test] = true if integration_options[:test_mode] @provider ||= provider_class.new(integration_options) end def options options_hash = {} preferences.each { |key, value| options_hash[key.to_sym] = value } options_hash end end end
Version data entries
144 entries across 144 versions & 5 rubygems