lib/active_merchant/billing/gateways/braintree.rb in activemerchant-1.6.0 vs lib/active_merchant/billing/gateways/braintree.rb in activemerchant-1.7.0

- old
+ new

@@ -1,17 +1,17 @@ -require File.join(File.dirname(__FILE__),'smart_ps.rb') +require File.dirname(__FILE__) + '/braintree/braintree_common' + module ActiveMerchant #:nodoc: module Billing #:nodoc: - class BraintreeGateway < SmartPs - def api_url - 'https://secure.braintreepaymentgateway.com/api/transact.php' + class BraintreeGateway < Gateway + include BraintreeCommon + + def self.new(options={}) + if options.has_key?(:login) + BraintreeOrangeGateway.new(options) + else + BraintreeBlueGateway.new(options) + end end - - self.supported_countries = ['US'] - self.supported_cardtypes = [:visa, :master, :american_express, :discover] - self.homepage_url = 'http://www.braintreepaymentsolutions.com' - self.display_name = 'Braintree' - self.default_currency = 'USD' end end end -