Class: Payment::Gateways::Default
- Inherits:
-
BasePaymentGateway
- Object
- BasePaymentGateway
- Payment::Gateways::Default
- Defined in:
- app/services/payment/gateways/default.rb
Defined Under Namespace
Classes: Result
Instance Method Summary collapse
- #authorize ⇒ Object
- #capture(params1 = nil, options = {}) ⇒ Object
- #credit(params1 = nil) ⇒ Object
-
#initialize(payment, _delivery = nil) ⇒ Default
constructor
A new instance of Default.
- #purchase(params1 = nil, options = {}) ⇒ Object
- #reauthorize(params1 = nil) ⇒ Object
- #refund(params1 = nil, params2 = nil) ⇒ Object
- #void(report_fraud = false) ⇒ Object
Constructor Details
#initialize(payment, _delivery = nil) ⇒ Default
Returns a new instance of Default.
6 7 8 9 10 |
# File 'app/services/payment/gateways/default.rb', line 6 def initialize(payment, _delivery = nil) @payment = payment success = nil = nil end |
Instance Method Details
#authorize ⇒ Object
12 13 14 15 |
# File 'app/services/payment/gateways/default.rb', line 12 def @payment. Result.new(success: true) end |
#capture(params1 = nil, options = {}) ⇒ Object
28 29 30 |
# File 'app/services/payment/gateways/default.rb', line 28 def capture(params1=nil, = {}) raise StandardError, "Payment 'Capture' action reached but not supported. Payment ID #{@payment.id}" end |
#credit(params1 = nil) ⇒ Object
40 41 42 |
# File 'app/services/payment/gateways/default.rb', line 40 def credit(params1=nil) raise StandardError, "Payment 'Credit' action reached but not supported. Payment ID #{@payment.id}" end |
#purchase(params1 = nil, options = {}) ⇒ Object
32 33 34 |
# File 'app/services/payment/gateways/default.rb', line 32 def purchase(params1=nil, = {}) raise StandardError, "Payment 'Purchase' action reached but not supported. Payment ID #{@payment.id}" end |
#reauthorize(params1 = nil) ⇒ Object
36 37 38 |
# File 'app/services/payment/gateways/default.rb', line 36 def (params1=nil) raise StandardError, "Payment 'Reauthorize' action reached but not supported. Payment ID #{@payment.id}" end |
#refund(params1 = nil, params2 = nil) ⇒ Object
24 25 26 |
# File 'app/services/payment/gateways/default.rb', line 24 def refund(params1=nil, params2=nil) raise StandardError, "Payment 'Refund' action reached but not supported. Payment ID #{@payment.id}" end |