Class: Processor::Base
- Inherits:
-
Object
- Object
- Processor::Base
- Extended by:
- ActiveModel::Callbacks
- Defined in:
- lib/nimbleshop/processor/base.rb
Overview
Processor
Processor class is responsible for payment processing transactions using gateway. This is an abstract class in the sense that implementations of processors should sublass Processor class.
It defines five methods: authorize, kapture, purchase, void and refund . These methods in turn invoke methods do_authorize, do_kapture, do_purchase, do_void, do_refund.
Instance Method Summary collapse
- #authorize(options = {}) ⇒ Object
- #kapture(options = {}) ⇒ Object
- #purchase(options = {}) ⇒ Object
- #refund(options = {}) ⇒ Object
- #void(options = {}) ⇒ Object
Instance Method Details
#authorize(options = {}) ⇒ Object
25 26 27 |
# File 'lib/nimbleshop/processor/base.rb', line 25 def ( = {}) execute(:authorize, ) end |
#kapture(options = {}) ⇒ Object
21 22 23 |
# File 'lib/nimbleshop/processor/base.rb', line 21 def kapture( = {}) execute(:kapture, ) end |
#purchase(options = {}) ⇒ Object
33 34 35 |
# File 'lib/nimbleshop/processor/base.rb', line 33 def purchase( = {}) execute(:purchase, ) end |
#refund(options = {}) ⇒ Object
37 38 39 |
# File 'lib/nimbleshop/processor/base.rb', line 37 def refund( = {}) execute(:refund, ) end |
#void(options = {}) ⇒ Object
29 30 31 |
# File 'lib/nimbleshop/processor/base.rb', line 29 def void( = {}) execute(:void, ) end |