Module: ActiveMerchant::Billing::Integrations::Citrus

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

Defined Under Namespace

Classes: Helper, Notification, Return

Class Method Summary collapse

Class Method Details

.checksum(secret_key, payload_items) ⇒ Object



44
45
46
47
# File 'lib/active_merchant/billing/integrations/citrus.rb', line 44

def self.checksum(secret_key, payload_items )
  digest = OpenSSL::Digest::Digest.new('sha1')
OpenSSL::HMAC.hexdigest(digest, secret_key, payload_items)
end

.credential_based_url(options) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/active_merchant/billing/integrations/citrus.rb', line 17

def self.credential_based_url(options)
  pmt_url = options[:credential3]

  case ActiveMerchant::Billing::Base.integration_mode
  when :production
    self.production_url + pmt_url
  when :test
    self.sandbox_url    + pmt_url
  when :staging
  	self.staging_url    + pmt_url
  else
    raise StandardError, "Integration mode set to an invalid value: #{mode}"
  end
end

.helper(order, account, options = {}) ⇒ Object



32
33
34
# File 'lib/active_merchant/billing/integrations/citrus.rb', line 32

def self.helper(order, , options = {})
  Helper.new(order, , options)
end

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



36
37
38
# File 'lib/active_merchant/billing/integrations/citrus.rb', line 36

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

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



40
41
42
# File 'lib/active_merchant/billing/integrations/citrus.rb', line 40

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