Sha256: a2e16554b555b2228798d2d5f5f64d4b2f8dc9e069cff9686bd6dfbb06376151

Contents?: true

Size: 1.3 KB

Versions: 11

Compression:

Stored size: 1.3 KB

Contents

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    module Integrations #:nodoc:
      module Paypal
        autoload :Return, 'active_merchant/billing/integrations/paypal/return.rb'
        autoload :Helper, 'active_merchant/billing/integrations/paypal/helper.rb'
        autoload :Notification, 'active_merchant/billing/integrations/paypal/notification.rb'
        
        # Overwrite this if you want to change the Paypal test url
        mattr_accessor :test_url
        self.test_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr'
        
        # Overwrite this if you want to change the Paypal production url
        mattr_accessor :production_url 
        self.production_url = 'https://www.paypal.com/cgi-bin/webscr' 
        
        def self.service_url
          mode = ActiveMerchant::Billing::Base.integration_mode
          case mode
          when :production
            self.production_url    
          when :test
            self.test_url
          else
            raise StandardError, "Integration mode set to an invalid value: #{mode}"
          end
        end
            
        def self.notification(post)
          Notification.new(post)
        end
        
        def self.return(query_string, options = {})
          Return.new(query_string)
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
activemerchant-1.12.1 lib/active_merchant/billing/integrations/paypal.rb
activemerchant-1.12.0 lib/active_merchant/billing/integrations/paypal.rb
activemerchant-1.11.0 lib/active_merchant/billing/integrations/paypal.rb
activemerchant-1.10.0 lib/active_merchant/billing/integrations/paypal.rb
activemerchant-1.9.4 lib/active_merchant/billing/integrations/paypal.rb
activemerchant-1.9.3 lib/active_merchant/billing/integrations/paypal.rb
activemerchant-1.9.2 lib/active_merchant/billing/integrations/paypal.rb
n8_activemerchant-1.9.3 lib/active_merchant/billing/integrations/paypal.rb
maedana-activemerchant-1.9.1.1 lib/active_merchant/billing/integrations/paypal.rb
activemerchant-1.9.1 lib/active_merchant/billing/integrations/paypal.rb
activemerchant-1.9.0 lib/active_merchant/billing/integrations/paypal.rb