Class: Workarea::Payment::Refund::CreditCard
- Inherits:
-
Object
- Object
- Workarea::Payment::Refund::CreditCard
- Includes:
- CreditCardOperation, OperationImplementation
- Defined in:
- app/models/workarea/payment/refund/credit_card.rb
Instance Method Summary collapse
Methods included from CreditCardOperation
#gateway, #handle_active_merchant_errors
Methods included from OperationImplementation
#initialize, #validate_reference!
Instance Method Details
#cancel! ⇒ Object
19 20 21 |
# File 'app/models/workarea/payment/refund/credit_card.rb', line 19 def cancel! # noop end |
#complete! ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'app/models/workarea/payment/refund/credit_card.rb', line 8 def complete! validate_reference! transaction.response = handle_active_merchant_errors do gateway.refund( transaction.amount.cents, transaction.reference.response. ) end end |