Sha256: b10cc2d24765c8649ef536ca6eb7da95c1fe73a68282ffa7df8fb15667b5dd8e
Contents?: true
Size: 1.24 KB
Versions: 7
Compression:
Stored size: 1.24 KB
Contents
# File: lib/forge/ecommerce.rb # Adds configuration options for ecommerce # eg. # # Forge.configure do |config| # config.ecommerce.payments = :hosted or :integrated # config.ecommerce.shippers = { # :one => One, # :two => Two # } # # config.ecommerce.active_merchant = { # :gateway => "gateway", # :login => "login", # :password => "password" # } # # config.ecommerce.email_receipt = true # # config.ecommerce.currency = "CAD" # # config.ecommerce.paypal_production = { # :account => {} # } # # config.ecommerce.paypal_sandbox = { # :account => {} # } # end module Forge class Configuration def ecommerce @ecommerce ||= EcommerceConfiguration.new end class EcommerceConfiguration attr_accessor :payments, :flat_rate_shipping, :shippers, :email_receipt, :active_merchant, :paypal_production, :paypal_sandbox, :currency def initialize @payments = :hosted @shippers = {} @active_merchant = {} @paypal_production = {} @paypal_sandbox = {} end def payments @payments.to_sym end def active_merchant { :base_mode => :test } end end end end
Version data entries
7 entries across 7 versions & 1 rubygems