Sha256: 097a650e8bead7cfba440f0bd453b06178babc3c0f99efc81fbad4659c745277

Contents?: true

Size: 1.23 KB

Versions: 29

Compression:

Stored size: 1.23 KB

Contents

require 'active_merchant/billing/integrations/paypal/helper.rb'
require 'active_merchant/billing/integrations/paypal/notification.rb'
require 'active_merchant/billing/integrations/paypal/return.rb'

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    module Integrations #:nodoc:
      module Paypal
        
        # 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)
          Return.new(query_string)
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 10 rubygems

Version Path
johnideal-activemerchant-1.4.10 lib/active_merchant/billing/integrations/paypal.rb
johnideal-activemerchant-1.4.11 lib/active_merchant/billing/integrations/paypal.rb
johnideal-activemerchant-1.4.4 lib/active_merchant/billing/integrations/paypal.rb
johnideal-activemerchant-1.4.5 lib/active_merchant/billing/integrations/paypal.rb
johnideal-activemerchant-1.4.6 lib/active_merchant/billing/integrations/paypal.rb
johnideal-activemerchant-1.4.7 lib/active_merchant/billing/integrations/paypal.rb
johnideal-activemerchant-1.4.8 lib/active_merchant/billing/integrations/paypal.rb
martinstannard-activemerchant-0.1.0 lib/active_merchant/billing/integrations/paypal.rb
mattbauer-activemerchant-1.4.2 lib/active_merchant/billing/integrations/paypal.rb
seamusabshere-active_merchant-1.4.2.1 lib/active_merchant/billing/integrations/paypal.rb
seamusabshere-active_merchant-1.4.2.3 lib/active_merchant/billing/integrations/paypal.rb
tomriley-active_merchant-1.4.2.3 lib/active_merchant/billing/integrations/paypal.rb
tomriley-active_merchant-1.4.2.4 lib/active_merchant/billing/integrations/paypal.rb
tomriley-active_merchant-1.4.2.5 lib/active_merchant/billing/integrations/paypal.rb
tomriley-active_merchant-1.4.2.6 lib/active_merchant/billing/integrations/paypal.rb
tomriley-active_merchant-1.4.2.7 lib/active_merchant/billing/integrations/paypal.rb
tomriley-active_merchant-1.4.2.8 lib/active_merchant/billing/integrations/paypal.rb
tomriley-tomriley-active_merchant-1.4.2.4 lib/active_merchant/billing/integrations/paypal.rb
tomriley-active_merchant-1.4.2.11 lib/active_merchant/billing/integrations/paypal.rb
tomriley-active_merchant-1.4.2.10 lib/active_merchant/billing/integrations/paypal.rb