Module: OffsitePayments::Integrations::Valitor

Defined in:
lib/offsite_payments/integrations/valitor.rb

Defined Under Namespace

Modules: ResponseFields Classes: Helper, Notification, Return

Class Method Summary collapse

Class Method Details

.notification(params, options = {}) ⇒ Object



18
19
20
# File 'lib/offsite_payments/integrations/valitor.rb', line 18

def self.notification(params, options={})
  Notification.new(params, options.merge(:test => test?))
end

.return(query_string, options = {}) ⇒ Object



22
23
24
# File 'lib/offsite_payments/integrations/valitor.rb', line 22

def self.return(query_string, options={})
  Return.new(query_string, options.merge(:test => test?))
end

.service_urlObject



14
15
16
# File 'lib/offsite_payments/integrations/valitor.rb', line 14

def self.service_url
  (test? ? test_url : production_url)
end

.test?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/offsite_payments/integrations/valitor.rb', line 10

def self.test?
  (OffsitePayments.mode == :test)
end