Sha256: 8cd775b5dba64e72adf85509cd83405c147267d22a1ea041b6e378fb24c23c34
Contents?: true
Size: 511 Bytes
Versions: 13
Compression:
Stored size: 511 Bytes
Contents
# frozen_string_literal: true module FlowcommerceSpree class UpdatePaymentCaptureWorker < FlowIoWorker sidekiq_options retry: 3, queue: :flow_io 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 end end
Version data entries
13 entries across 13 versions & 1 rubygems