Class: Caboose::PaymentProcessors::Base
- Inherits:
-
Object
- Object
- Caboose::PaymentProcessors::Base
- Defined in:
- app/models/caboose/payment_processors/base.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#authorize_error(params) ⇒ Object
Called if authorized? returns false.
-
#authorize_relay(params) ⇒ Object
Handles the relay during an authorize transaction.
-
#authorized?(params) ⇒ Boolean
Called during the receipt of an authorize transaction.
-
#capture(order) ⇒ Object
Captures funds for the given order.
-
#get_authorize_form(transaction) ⇒ Object
Gets the hidden form and hidden iframe to which the form will be submitted.
-
#get_authorize_transaction(order) ⇒ Object
Gets a transaction object that obfuscates transaction info.
Instance Method Details
#authorize_error(params) ⇒ Object
Called if authorized? returns false. Returns the error given by the processor.
30 31 32 |
# File 'app/models/caboose/payment_processors/base.rb', line 30 def (params) return "" end |
#authorize_relay(params) ⇒ Object
Handles the relay during an authorize transaction.
Should save the transaction information if a successful authorize. Returns the response required to make the processor to redirect to /checkout/payment-receipt.
18 19 20 |
# File 'app/models/caboose/payment_processors/base.rb', line 18 def (params) return "" end |
#authorized?(params) ⇒ Boolean
Called during the receipt of an authorize transaction. Returns true of false indicating whether the authorize transaction was successful.
24 25 26 |
# File 'app/models/caboose/payment_processors/base.rb', line 24 def (params) return false end |
#capture(order) ⇒ Object
Captures funds for the given order. Returns true or false indicating the success of the transaction.
36 37 38 |
# File 'app/models/caboose/payment_processors/base.rb', line 36 def capture(order) return false end |
#get_authorize_form(transaction) ⇒ Object
Gets the hidden form and hidden iframe to which the form will be submitted.
Both are shown on the /checkout/billing page.
11 12 13 |
# File 'app/models/caboose/payment_processors/base.rb', line 11 def (transaction) return "" end |
#get_authorize_transaction(order) ⇒ Object
Gets a transaction object that obfuscates transaction info.
Included in this info is the relay URL, which should be set to /checkout/payment-relay.
5 6 7 |
# File 'app/models/caboose/payment_processors/base.rb', line 5 def (order) return {} end |