require 'merb_merchant/billing/integrations/paypal/helper.rb' require 'merb_merchant/billing/integrations/paypal/notification.rb' require 'merb_merchant/billing/integrations/paypal/return.rb' module MerbMerchant #:nodoc: module Billing #:nodoc: module Integrations #:nodoc: module Paypal # Overwrite this if you want to change the Paypal test url def self.test_url @@test_url end def self.test_url=(test_url) @@test_url = test_url end self.test_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr' # Overwrite this if you want to change the Paypal production url def self.production_url @@production_url end def self.production_url=(production_url) @@production_url = production_url end self.production_url = 'https://www.paypal.com/cgi-bin/webscr' def self.service_url mode = MerbMerchant::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