module Workarea::CyberSource
Constants
- VERSION
Public Class Methods
auto_configure_gateway()
click to toggle source
# File lib/workarea/cyber_source.rb, line 12 def self.auto_configure_gateway if Rails.application.secrets.cyber_source.present? if ENV["HTTP_PROXY"].present? uri = URI.parse(ENV["HTTP_PROXY"]) ActiveMerchant::Billing::CyberSourceGateway.proxy_address = uri.host ActiveMerchant::Billing::CyberSourceGateway.proxy_port = uri.port end self.gateway = ActiveMerchant::Billing::CyberSourceGateway.new( Rails.application.secrets.cyber_source.deep_symbolize_keys ) else self.gateway = ActiveMerchant::Billing::BogusCyberSourceGateway.new end end
gateway()
click to toggle source
# File lib/workarea/cyber_source.rb, line 28 def self.gateway Workarea.config.gateways.credit_card end
gateway=(gateway)
click to toggle source
# File lib/workarea/cyber_source.rb, line 32 def self.gateway=(gateway) Workarea.config.gateways.credit_card = gateway end