Class: PaymentMethod
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- PaymentMethod
- Includes:
- Permalink::Builder
- Defined in:
- app/models/payment_method.rb
Class Method Summary collapse
Instance Method Summary collapse
- #demodulized_underscore ⇒ Object
-
#live_mode? ⇒ Boolean
return true if payment method is running in live mode.
-
#test_mode? ⇒ Boolean
return true if payment method is running in test mode.
-
#use_ssl? ⇒ Boolean
By default payment_method does not require that application must use SSL.
Methods included from Permalink::Builder
Class Method Details
.current ⇒ Object
35 36 37 |
# File 'app/models/payment_method.rb', line 35 def self.current self.first end |
.partialize ⇒ Object
21 22 23 |
# File 'app/models/payment_method.rb', line 21 def self.partialize name.gsub("PaymentMethod::","").underscore end |
Instance Method Details
#demodulized_underscore ⇒ Object
17 18 19 |
# File 'app/models/payment_method.rb', line 17 def demodulized_underscore self.class.name.demodulize.underscore end |
#live_mode? ⇒ Boolean
return true if payment method is running in live mode
26 27 28 |
# File 'app/models/payment_method.rb', line 26 def live_mode? !test_mode? end |
#test_mode? ⇒ Boolean
return true if payment method is running in test mode
31 32 33 |
# File 'app/models/payment_method.rb', line 31 def test_mode? self.mode == 'test' end |
#use_ssl? ⇒ Boolean
By default payment_method does not require that application must use SSL. Individual payment method should override this method.
13 14 15 |
# File 'app/models/payment_method.rb', line 13 def use_ssl? false end |