Commit 36bb85d7 authored by Jonathan Sacksick's avatar Jonathan Sacksick
Browse files

Revert "Issue #3281136 by jsacksick: Allow reacting to the Commerce recurring...

Revert "Issue #3281136 by jsacksick: Allow reacting to the Commerce recurring payment declined event."

This reverts commit 74a72f9d.
parent 74a72f9d
Loading
Loading
Loading
Loading
+0 −28
Original line number Diff line number Diff line
<?php

namespace Drupal\commerce_email\Plugin\Commerce\EmailEvent;

use Drupal\commerce_recurring\Event\PaymentDeclinedEvent;
use Drupal\Component\EventDispatcher\Event;

/**
 * Provides the RecurringPaymentDeclined email event.
 *
 * @CommerceEmailEvent(
 *   id = "commerce_recurring_payment_declined",
 *   label = @Translation("Commerce Recurring - Payment declined"),
 *   event_name = "commerce_recurring.payment_declined",
 *   entity_type = "commerce_order",
 * )
 */
class RecurringPaymentDeclined extends EmailEventBase {

  /**
   * {@inheritdoc}
   */
  public function extractEntityFromEvent(Event $event) {
    assert($event instanceof PaymentDeclinedEvent);
    return $event->getOrder();
  }

}