Class: Workarea::Payment::Capture::Paypal

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

Instance Method Summary collapse

Instance Method Details

#cancel!Object



19
20
21
# File 'app/models/workarea/payment/capture/paypal.rb', line 19

def cancel!
  # noop, nothing to cancel
end

#complete!Object



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

def complete!
  # Capture can only happen if the initial capture was not completed
  # immediately. Since we cannot force a pending capture to complete,
  # this will only fail with an explanation that the capture will
  # complete via webhook or never be completed.
  #
  transaction.response = ActiveMerchant::Billing::Response.new(
    false,
    I18n.t('workarea.payment.paypal_capture')
  )
end