Module: OffsitePayments::Integrations::DirecPay

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

Defined Under Namespace

Classes: Helper, Notification, Return, Status

Class Method Summary collapse

Class Method Details

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



21
22
23
# File 'lib/offsite_payments/integrations/direc_pay.rb', line 21

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

.request_status_update(mid, transaction_id, notification_url) ⇒ Object



29
30
31
# File 'lib/offsite_payments/integrations/direc_pay.rb', line 29

def self.request_status_update(mid, transaction_id, notification_url)
  Status.new(mid).update(transaction_id, notification_url)
end

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



25
26
27
# File 'lib/offsite_payments/integrations/direc_pay.rb', line 25

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

.service_urlObject



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

def self.service_url
  mode = OffsitePayments.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