Class: SolidusBolt::PaymentMethod
- Inherits:
-
Object
- Object
- SolidusBolt::PaymentMethod
- Defined in:
- app/models/solidus_bolt/payment_method.rb
Instance Method Summary collapse
- #gateway_class ⇒ Object
- #partial_name ⇒ Object
- #payment_source_class ⇒ Object
- #preferred_bolt_api_url ⇒ Object
- #preferred_bolt_base_url ⇒ Object
- #try_void(payment) ⇒ Object
Instance Method Details
#gateway_class ⇒ Object
9 10 11 |
# File 'app/models/solidus_bolt/payment_method.rb', line 9 def gateway_class ::SolidusBolt::Gateway end |
#partial_name ⇒ Object
17 18 19 |
# File 'app/models/solidus_bolt/payment_method.rb', line 17 def partial_name 'bolt' end |
#payment_source_class ⇒ Object
13 14 15 |
# File 'app/models/solidus_bolt/payment_method.rb', line 13 def payment_source_class ::SolidusBolt::PaymentSource end |
#preferred_bolt_api_url ⇒ Object
25 26 27 |
# File 'app/models/solidus_bolt/payment_method.rb', line 25 def preferred_bolt_api_url bolt_config.environment_url end |
#preferred_bolt_base_url ⇒ Object
21 22 23 |
# File 'app/models/solidus_bolt/payment_method.rb', line 21 def preferred_bolt_base_url bolt_config. end |
#try_void(payment) ⇒ Object
29 30 31 32 33 |
# File 'app/models/solidus_bolt/payment_method.rb', line 29 def try_void(payment) return false unless payment.source.can_void?(payment) gateway.void(payment.response_code, originator: payment) end |