Module: ActiveMerchant::Billing::Integrations::DirecPay

Defined in:
lib/active_merchant/billing/integrations/direc_pay.rb,
lib/active_merchant/billing/integrations/direc_pay/helper.rb,
lib/active_merchant/billing/integrations/direc_pay/return.rb,
lib/active_merchant/billing/integrations/direc_pay/status.rb,
lib/active_merchant/billing/integrations/direc_pay/notification.rb

Defined Under Namespace

Classes: Helper, Notification, Return, Status

Class Method Summary collapse

Class Method Details

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



27
28
29
# File 'lib/active_merchant/billing/integrations/direc_pay.rb', line 27

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

.request_status_update(mid, transaction_id, notification_url) ⇒ Object



35
36
37
# File 'lib/active_merchant/billing/integrations/direc_pay.rb', line 35

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

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



31
32
33
# File 'lib/active_merchant/billing/integrations/direc_pay.rb', line 31

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

.service_urlObject



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/active_merchant/billing/integrations/direc_pay.rb', line 15

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