Module: OffsitePayments::Integrations::EPaymentPlans

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

Defined Under Namespace

Classes: Helper, Notification

Class Method Summary collapse

Class Method Details

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



34
35
36
# File 'lib/offsite_payments/integrations/e_payment_plans.rb', line 34

def self.notification(post, options = {})
  Notification.new(post, options)
end

.notification_confirmation_urlObject



22
23
24
25
26
27
28
29
30
31
32
# File 'lib/offsite_payments/integrations/e_payment_plans.rb', line 22

def self.notification_confirmation_url
  mode = OffsitePayments.mode
  case mode
  when :production
    "#{production_url}/order/confirmation"
  when :test
    "#{test_url}/order/confirmation"
  else
    raise StandardError, "Integration mode set to an invalid value: #{mode}"
  end
end

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



38
39
40
# File 'lib/offsite_payments/integrations/e_payment_plans.rb', line 38

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

.service_urlObject



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/offsite_payments/integrations/e_payment_plans.rb', line 10

def self.service_url
  mode = OffsitePayments.mode
  case mode
  when :production
    "#{production_url}/order/purchase"
  when :test
    "#{test_url}/order/purchase"
  else
    raise StandardError, "Integration mode set to an invalid value: #{mode}"
  end
end