Class: SpreeCmCommissioner::PaymentIncompleteNotificationSender

Inherits:
BaseInteractor
  • Object
show all
Defined in:
app/interactors/spree_cm_commissioner/payment_incomplete_notification_sender.rb

Instance Method Summary collapse

Instance Method Details

#callObject



3
4
5
6
7
8
9
10
11
12
13
# File 'app/interactors/spree_cm_commissioner/payment_incomplete_notification_sender.rb', line 3

def call
  order = context.notificable
  return if order.user.blank?
  return if order.reload.payment_fulfilled?

  SpreeCmCommissioner::OrderGeneralNotification.with(
    notificable: order,
    title: title,
    message: message(order)
  ).deliver_later(order.user)
end