Sha256: 7de0b03a56eec857a4acdf960cdf236bc1a0d8f1337b72e709203749ff74b03e

Contents?: true

Size: 1.36 KB

Versions: 93

Compression:

Stored size: 1.36 KB

Contents

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    module Integrations #:nodoc:
      module SagePayForm 
        autoload :Helper,       File.dirname(__FILE__) + '/sage_pay_form/helper.rb'
        autoload :Return,       File.dirname(__FILE__) + '/sage_pay_form/return.rb'
        autoload :Notification, File.dirname(__FILE__) + '/sage_pay_form/notification.rb'
        autoload :Encryption,   File.dirname(__FILE__) + '/sage_pay_form/encryption.rb'

        mattr_accessor :production_url
        mattr_accessor :test_url
        mattr_accessor :simulate_url
        self.production_url = 'https://live.sagepay.com/gateway/service/vspform-register.vsp'
        self.test_url       = 'https://test.sagepay.com/gateway/service/vspform-register.vsp'
        self.simulate_url   = 'https://test.sagepay.com/Simulator/VSPFormGateway.asp'

        def self.return(query_string, options = {})
          Return.new(query_string, options)
        end

        def self.service_url
          mode = ActiveMerchant::Billing::Base.integration_mode
          case mode
          when :production
            self.production_url    
          when :test
            self.test_url
          when :simulate
            self.simulate_url
          else
            raise StandardError, "Integration mode set to an invalid value: #{mode}"
          end
        end
      end
    end
  end
end

Version data entries

93 entries across 93 versions & 13 rubygems

Version Path
yetanothernguyen-activemerchant-1.21.0 lib/active_merchant/billing/integrations/sage_pay_form.rb
activemerchant-1.21.0 lib/active_merchant/billing/integrations/sage_pay_form.rb
tlconnor-activemerchant-1.20.4 lib/active_merchant/billing/integrations/sage_pay_form.rb
activemerchant-1.20.4 lib/active_merchant/billing/integrations/sage_pay_form.rb
activemerchant-1.20.3 lib/active_merchant/billing/integrations/sage_pay_form.rb
activemerchant-1.20.2 lib/active_merchant/billing/integrations/sage_pay_form.rb
activemerchant-1.20.1 lib/active_merchant/billing/integrations/sage_pay_form.rb
activemerchant-1.20.0 lib/active_merchant/billing/integrations/sage_pay_form.rb
vibedeck-activemerchant-1.18.2 lib/active_merchant/billing/integrations/sage_pay_form.rb
activemerchant-1.18.1 lib/active_merchant/billing/integrations/sage_pay_form.rb
fishman-activemerchant-1.18.0 lib/active_merchant/billing/integrations/sage_pay_form.rb
activemerchant-1.18.0 lib/active_merchant/billing/integrations/sage_pay_form.rb
activemerchant-1.17.0 lib/active_merchant/billing/integrations/sage_pay_form.rb
yetanothernguyen-activemerchant-1.16.0 lib/active_merchant/billing/integrations/sage_pay_form.rb
activemerchant-1.16.0 lib/active_merchant/billing/integrations/sage_pay_form.rb
gonow-activemerchant-1.15.0 lib/active_merchant/billing/integrations/sage_pay_form.rb
bitfluent-activemerchant-1.15.1 lib/active_merchant/billing/integrations/sage_pay_form.rb
activemerchant-kiddy-1.15.0.kiddy.1 lib/active_merchant/billing/integrations/sage_pay_form.rb
activemerchant-kiddy-1.15.0.kiddy lib/active_merchant/billing/integrations/sage_pay_form.rb
activemerchant-1.15.0 lib/active_merchant/billing/integrations/sage_pay_form.rb