Class: FlowcommerceSpree::UpdatePaymentCaptureWorker
- Inherits:
-
FlowIoWorker
- Object
- FlowIoWorker
- FlowcommerceSpree::UpdatePaymentCaptureWorker
- Defined in:
- app/workers/flowcommerce_spree/update_payment_capture_worker.rb
Instance Method Summary collapse
Instance Method Details
#perform(order_number, capture = {}) ⇒ Object
7 8 9 10 11 12 13 |
# File 'app/workers/flowcommerce_spree/update_payment_capture_worker.rb', line 7 def perform(order_number, capture = {}) order = Spree::Order.find_by number: order_number raise 'Order has no payments' if order.payments.empty? FlowcommerceSpree::Webhooks::CaptureUpsertedV2.new({ capture: capture }.as_json) .store_payment_capture(order, capture) end |