lib/support/gateway_support.rb in activemerchant-1.26.0 vs lib/support/gateway_support.rb in activemerchant-1.27.0

- old
+ new

@@ -9,10 +9,19 @@ include ActiveMerchant::Billing attr_reader :gateways def initialize + Dir[File.expand_path(File.dirname(__FILE__) + '/../active_merchant/billing/gateways/*.rb')].each do |f| + filename = File.basename(f, '.rb') + gateway_name = filename + '_gateway' + begin + gateway_class = ('ActiveMerchant::Billing::' + gateway_name.camelize).constantize + rescue NameError + puts "Could not load gateway " + gateway_name.camelize + " from " + f + "." + end + end @gateways = Gateway.implementations.sort_by(&:name) @gateways.delete(ActiveMerchant::Billing::BogusGateway) end def each_gateway @@ -52,7 +61,5 @@ puts "#{g.display_name} - #{g.homepage_url} [#{g.supported_countries.join(', ')}]" end end end - - \ No newline at end of file