Class: SolidusBolt::Handlers::CaptureHandler

Inherits:
BaseHandler
  • Object
show all
Defined in:
app/webhooks/solidus_bolt/handlers/capture_handler.rb

Instance Attribute Summary

Attributes inherited from BaseHandler

#params

Instance Method Summary collapse

Methods inherited from BaseHandler

call, #initialize

Constructor Details

This class inherits a constructor from SolidusBolt::Handlers::BaseHandler

Instance Method Details

#callObject



6
7
8
9
10
# File 'app/webhooks/solidus_bolt/handlers/capture_handler.rb', line 6

def call
  capture_amount = params[:data][:captures].last[:amount][:amount].to_i

  SolidusBolt::Payments::CaptureSyncService.call(payment: payment, capture_amount: capture_amount)
end