Sha256: 7dff53d39ae9525bedf17347a13df0240e4a0be4e5010d7263868ca2f9ee179a
Contents?: true
Size: 1.53 KB
Versions: 5
Compression:
Stored size: 1.53 KB
Contents
module Opay module Configuration extend ActiveSupport::Concern include ActiveSupport::Configurable included do config_accessor :providers # payu configuration config_accessor :payu_pos_id config_accessor :payu_pos_auth_key config_accessor :payu_key1 config_accessor :payu_key2 # paypal configuration config_accessor :paypal_login config_accessor :paypal_password config_accessor :paypal_signature config_accessor :test_mode config_accessor :process_payments_localy config_accessor :success_url config_accessor :cancel_url reset_config end module ClassMethods def configure yield self end # Sets configuration back to default def reset_config configure do |config| config.providers = [:payu, :paypal] config.success_url = :success_payment_url config.cancel_url = :cancel_payment_url # payu configuration config.payu_pos_id = ENV['PAYU_POS_ID'] config.payu_pos_auth_key = ENV['PAYU_POS_AUTH_KEY'] config.payu_key1 = ENV['PAYU_KEY1'] config.payu_key2 = ENV['PAYU_KEY2'] # paypal configuration config.paypal_login = ENV['PAYPAL_LOGIN'] config.paypal_password = ENV['PAYPAL_PASSWORD'] config.paypal_signature = ENV['PAYPAL_SIGNATURE'] config.test_mode = false config.process_payments_localy = true if Rails.env.development? end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
opay-1.2.5 | lib/opay/configuration.rb |
opay-1.2.4 | lib/opay/configuration.rb |
opay-1.2.3 | lib/opay/configuration.rb |
opay-1.2.2 | lib/opay/configuration.rb |
opay-1.2.1 | lib/opay/configuration.rb |