Sha256: 3ee3de480f5326985dfba6ee51224882ff76b7e95c0bd0c311d7513754a7d177
Contents?: true
Size: 595 Bytes
Versions: 26
Compression:
Stored size: 595 Bytes
Contents
module Spree module Api module Webhooks module PaymentDecorator def self.prepended(base) def base.custom_webhook_events %w[payment.paid payment.voided] end end def after_void super queue_webhooks_requests!('payment.voided') end def after_completed super queue_webhooks_requests!('payment.paid') order.queue_webhooks_requests!('order.paid') if order.paid? end end end end end Spree::Payment.prepend(Spree::Api::Webhooks::PaymentDecorator)
Version data entries
26 entries across 26 versions & 3 rubygems