Class: Workarea::Payment::Refund::Paypal

Inherits:
Object
  • Object
show all
Includes:
OperationImplementation
Defined in:
app/models/workarea/payment/refund/paypal.rb

Instance Method Summary collapse

Instance Method Details

#cancel!Object



17
18
19
# File 'app/models/workarea/payment/refund/paypal.rb', line 17

def cancel!
  # noop
end

#complete!Object



7
8
9
10
11
12
13
14
15
# File 'app/models/workarea/payment/refund/paypal.rb', line 7

def complete!
  validate_reference!

  transaction.response =
    Workarea::Paypal.gateway.refund(
      transaction.reference.response.params['id'],
      amount: transaction.amount
    )
end