Module: OffsitePayments::Integrations::PayFast
- Defined in:
- lib/offsite_payments/integrations/pay_fast.rb
Overview
Defined Under Namespace
Modules: Common
Classes: Helper, Notification, Return
Class Method Summary
collapse
Class Method Details
.helper(order, account, options = {}) ⇒ Object
49
50
51
|
# File 'lib/offsite_payments/integrations/pay_fast.rb', line 49
def self.helper(order, account, options = {})
Helper.new(order, account, options)
end
|
.notification(query_string, options = {}) ⇒ Object
53
54
55
|
# File 'lib/offsite_payments/integrations/pay_fast.rb', line 53
def self.notification(query_string, options = {})
Notification.new(query_string, options)
end
|
.return(post, options = {}) ⇒ Object
57
58
59
|
# File 'lib/offsite_payments/integrations/pay_fast.rb', line 57
def self.return(post, options = {})
Return.new(post, options)
end
|
.service_url ⇒ Object
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/offsite_payments/integrations/pay_fast.rb', line 25
def self.service_url
mode = OffsitePayments.mode
case mode
when :production
self.process_production_url
when :test
self.process_test_url
else
raise StandardError, "Integration mode set to an invalid value: #{mode}"
end
end
|
.validate_service_url ⇒ Object
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/offsite_payments/integrations/pay_fast.rb', line 37
def self.validate_service_url
mode = OffsitePayments.mode
case mode
when :production
self.validate_production_url
when :test
self.validate_test_url
else
raise StandardError, "Integration mode set to an invalid value: #{mode}"
end
end
|