Class: Gateway::Gtpay
- Inherits:
-
Gateway
- Object
- Gateway
- Gateway::Gtpay
- Defined in:
- app/models/spree/gateway/gtpay.rb
Instance Method Summary collapse
- #actions ⇒ Object
- #can_capture?(payment) ⇒ Boolean
- #can_void?(payment) ⇒ Boolean
- #capture(*args) ⇒ Object
- #source_required? ⇒ Boolean
- #void(*args) ⇒ Object
Instance Method Details
#actions ⇒ Object
9 10 11 |
# File 'app/models/spree/gateway/gtpay.rb', line 9 def actions %w{capture void} end |
#can_capture?(payment) ⇒ Boolean
13 14 15 |
# File 'app/models/spree/gateway/gtpay.rb', line 13 def can_capture?(payment) ['checkout', 'pending'].include?(payment.state) end |
#can_void?(payment) ⇒ Boolean
17 18 19 |
# File 'app/models/spree/gateway/gtpay.rb', line 17 def can_void?(payment) payment.state != 'void' end |
#capture(*args) ⇒ Object
21 22 23 |
# File 'app/models/spree/gateway/gtpay.rb', line 21 def capture(*args) ActiveMerchant::Billing::Response.new(true, "", {}, {}) end |
#source_required? ⇒ Boolean
29 30 31 |
# File 'app/models/spree/gateway/gtpay.rb', line 29 def source_required? false end |
#void(*args) ⇒ Object
25 26 27 |
# File 'app/models/spree/gateway/gtpay.rb', line 25 def void(*args) ActiveMerchant::Billing::Response.new(true, "", {}, {}) end |