Module: ActiveMerchant::Billing::Integrations::PayuIn
- Defined in:
- lib/active_merchant/billing/integrations/payu_in.rb,
lib/active_merchant/billing/integrations/payu_in/helper.rb,
lib/active_merchant/billing/integrations/payu_in/return.rb,
lib/active_merchant/billing/integrations/payu_in/notification.rb
Defined Under Namespace
Classes: Helper, Notification, Return
Class Method Summary
collapse
Class Method Details
.checksum(merchant_id, secret_key, *payload_items) ⇒ Object
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/active_merchant/billing/integrations/payu_in.rb', line 30
def self.checksum(merchant_id, secret_key, *payload_items )
options = payload_items.pop if Hash === payload_items.last
options ||= {}
payload = if options[:reverse] then
payload_items.dup.push( merchant_id || "" ).unshift( secret_key || "" ).collect{ |x| x.to_s }.join("|")
else
payload_items.dup.unshift( merchant_id || "" ).push( secret_key || "" ).collect{ |x| x.to_s }.join("|")
end
Digest::SHA512.hexdigest( payload )
end
|
.notification(post, options = {}) ⇒ Object
22
23
24
|
# File 'lib/active_merchant/billing/integrations/payu_in.rb', line 22
def self.notification(post, options = {})
Notification.new(post, options)
end
|
.return(post, options = {}) ⇒ Object
26
27
28
|
# File 'lib/active_merchant/billing/integrations/payu_in.rb', line 26
def self.return(post, options = {})
Return.new(post, options)
end
|
.service_url ⇒ Object
18
19
20
|
# File 'lib/active_merchant/billing/integrations/payu_in.rb', line 18
def self.service_url
ActiveMerchant::Billing::Base.integration_mode == :production ? self.production_url : self.test_url
end
|