diff --git a/payment/payment.api.php b/payment/payment.api.php
deleted file mode 100644
index 3991a87..0000000
--- a/payment/payment.api.php
+++ /dev/null
@@ -1,218 +0,0 @@
-<?php
-
-/**
- * @file
- * Hook documentation.
- */
-
-use Drupal\Core\Session\AccountInterface;
-use Drupal\payment\Entity\PaymentInterface;
-use Drupal\payment\Plugin\Payment\Method\PaymentMethodInterface;
-use Drupal\payment\Plugin\Payment\Status\PaymentStatusInterface;
-
-/**
- * Alters payment status plugins.
- *
- * @param array $definitions
- *   Keys are plugin IDs. Values are plugin definitions.
- */
-function hook_payment_status_alter(array &$definitions) {
-  // Rename a plugin.
-  $definitions['payment_failed']['label'] = 'Something went wrong!';
-}
-
-/**
- * Alters payment method plugins.
- *
- * @param array $definitions
- *   Keys are plugin IDs. Values are plugin definitions.
- */
-function hook_payment_method_alter(array &$definitions) {
-  // Remvove a payment method plugin.
-  unset($definitions['foo_plugin_id']);
-
-  // Replace a payment method plugin with another.
-  $definitions['foo_plugin_id']['class'] = 'Drupal\foo\FooPaymentMethod';
-}
-
-/**
- * Alters payment method configuration plugins.
- *
- * @param array $definitions
- *   Keys are plugin IDs. Values are plugin definitions.
- */
-function hook_payment_method_configuration_alter(array &$definitions) {
-  // Remvove a payment method configuration plugin.
-  unset($definitions['foo_plugin_id']);
-
-  // Replace a payment method configuration plugin with another.
-  $definitions['foo_plugin_id']['class'] = 'Drupal\foo\FooPaymentMethodConfiguration';
-}
-
-/**
- * Alters payment method selector plugins.
- *
- * @param array $definitions
- *   Keys are plugin IDs. Values are plugin definitions.
- */
-function hook_payment_method_selector_alter(array &$definitions) {
-  // Remvove a payment method selector plugin.
-  unset($definitions['foo_plugin_id']);
-
-  // Replace a payment method selector plugin with another.
-  $definitions['foo_plugin_id']['class'] = 'Drupal\foo\FooPaymentMethodSelector';
-}
-
-/**
- * Alters line item plugins.
- *
- * @param array $definitions
- *   Keys are plugin IDs. Values are plugin definitions.
- */
-function hook_payment_line_item_alter(array &$definitions) {
-}
-
-/**
- * Alters payment type plugins.
- *
- * @param array $definitions
- *   Keys are plugein IDs. Values are plugin definitions.
- */
-function hook_payment_type_alter(array &$definitions) {
-}
-
-/**
- * Responds to a payment status being set.
- *
- * @see Payment::setStatus()
- * @see \Drupal\payment\Event\PaymentEvents::PAYMENT_STATUS_SET
- * @see \Drupal\payment\Event\PaymentStatusSet
- *
- * @param \Drupal\payment\Entity\PaymentInterface $payment
- * @param \Drupal\payment\Plugin\Payment\Status\PaymentStatusInterface $previous_status
- *   The status the payment had before the new one was set. This may be
- *   identical to the current/new status.
- *
- * @deprecated For proper dependency injection and testability, you are advised
- * to use the \Drupal\payment\Event\PaymentEvents::PAYMENT_STATUS_SET Symfony
- * event instead.
- */
-function hook_payment_status_set(PaymentInterface $payment, PaymentStatusInterface $previous_status = NULL) {
-  // Notify the site administrator, for instance.
-}
-
-/**
- * Executes before the payment type's original context is resumed.
- *
- * @see \Drupal\payment\Plugin\Payment\Type\PaymentTypeBase::resumeContext()
- * @see \Drupal\payment\Event\PaymentEvents::PAYMENT_TYPE_PRE_RESUME_CONTEXT
- * @see \Drupal\payment\Event\PaymentTypePreResumeContext
- *
- * @param \Drupal\payment\Entity\PaymentInterface $payment
- *
- * @deprecated For proper dependency injection and testability, you are advised
- * to use the \Drupal\payment\Event\PaymentEvents::PAYMENT_PRE_RESUME_CONTEXT
- * Symfony event instead.
- */
-function hook_payment_type_pre_resume_context(PaymentInterface $payment) {
-  if ($payment->getStatus()->isOrHasAncestor('payment_success')) {
-    drupal_set_message(t('Your payment was successfully completed.'));
-  }
-  else {
-    drupal_set_message(t('Your payment was not completed.'));
-  }
-}
-
-/**
- * Checks access for executing a payment.
- *
- * @param \Drupal\payment\Entity\PaymentInterface $payment
- *   $payment->getPaymentMethod() contains the method currently configured, but
- *   NOT the method that $payment should be tested against, which is
- *   $payment_method.
- * @param \Drupal\payment\Plugin\Payment\Method\PaymentMethodInterface $payment_method
- * @param \Drupal\Core\Session\AccountInterface $account
- *
- * @return string
- *   \Drupal\Core\Access\AccessInterface::ALLOW,
- *   \Drupal\Core\Access\AccessInterface::DENY, or
- *   \Drupal\Core\Access\AccessInterface::KILL.
- *
- * @see \Drupal\payment\Plugin\Payment\Method\PaymentMethodBase::executePaymentAccess()
- * @see \Drupal\payment\Plugin\Payment\Method\PaymentMethodBase::executePaymentAccessEvent()
- * @see \Drupal\payment\Event\PaymentEvents::PAYMENT_EXECUTE_ACCESS
- * @see \Drupal\payment\Event\PaymentExecuteAccess
- *
- * @deprecated For proper dependency injection and testability, you are advised
- * to use the \Drupal\payment\Event\PaymentEvents::PAYMENT_EXECUTE_ACCESS Symfony
- * event instead.
- */
-function hook_payment_execute_access(PaymentInterface $payment, PaymentMethodInterface $payment_method, AccountInterface $account) {}
-
-/**
- * Executes before a payment is executed.
- *
- * @param \Drupal\payment\Entity\PaymentInterface $payment
- *
- * @see \Drupal\payment\Plugin\Payment\Method\PaymentMethodBase::executePayment()
- * @see \Drupal\payment\Event\PaymentEvents::PAYMENT_PRE_EXECUTE
- * @see \Drupal\payment\Event\PaymentPreExecute
- *
- * @deprecated For proper dependency injection and testability, you are advised
- * to use the \Drupal\payment\Event\PaymentEvents::PAYMENT_PRE_EXECUTE Symfony
- * event instead.
- */
-function hook_payment_pre_execute(PaymentInterface $payment) {}
-
-/**
- * Executes before a payment is captured.
- *
- * @param \Drupal\payment\Entity\PaymentInterface $payment
- *
- * @see \Drupal\payment\Plugin\Payment\Method\PaymentMethodCapturePaymentInterface::capturePayment()
- * @see \Drupal\payment\Event\PaymentEvents::PAYMENT_PRE_CAPTURE
- * @see \Drupal\payment\Event\PaymentPreCapture
- *
- * @deprecated For proper dependency injection and testability, you are advised
- * to use the \Drupal\payment\Event\PaymentEvents::PAYMENT_PRE_CAPTURE Symfony
- * event instead.
- */
-function hook_payment_pre_capture(PaymentInterface $payment) {}
-
-/**
- * Executes before a payment is refunded.
- *
- * @param \Drupal\payment\Entity\PaymentInterface $payment
- *
- * @see \Drupal\payment\Plugin\Payment\Method\PaymentMethodCapturePaymentInterface::capturePayment()
- * @see \Drupal\payment\Event\PaymentEvents::PAYMENT_PRE_REFUND
- * @see \Drupal\payment\Event\PaymentPreRefund
- *
- * @deprecated For proper dependency injection and testability, you are advised
- * to use the \Drupal\payment\Event\PaymentEvents::PAYMENT_PRE_REFUND Symfony
- * event instead.
- */
-function hook_payment_pre_refund(PaymentInterface $payment) {}
-
-/**
- * Alters the IDs of payments available for referencing through an instance.
- *
- * @param string $category_id
- *   The ID of the category to load payment IDs for.
- * @param integer $owner_id
- *   The UID of the user for whom the payment should be available.
- * @param array $payment_ids
- *   The IDs of the payments that are available.
- *
- * @see \Drupal\payment\Event\PaymentEvents::PAYMENT_QUEUE_PAYMENT_IDS_ALTER
- * @see \Drupal\payment\Event\PaymentQueuePaymentIdsAlter
- *
- * @deprecated For proper dependency injection and testability, you are advised
- * to use the
- * \Drupal\payment\Event\PaymentEvents::PAYMENT_QUEUE_PAYMENT_IDS_ALTER Symfony
- * event instead.
- */
-function hook_payment_queue_payment_ids_alter($category_id, $owner_id, array &$payment_ids) {
-  // Add or remove payment IDs. All IDs MUST be stored in the queue before they
-  // can be used.
-}
diff --git a/payment/payment.module b/payment/payment.module
index 001a75a..42a2510 100644
--- a/payment/payment.module
+++ b/payment/payment.module
@@ -17,13 +17,6 @@ function payment_permission() {
 }
 
 /**
- * Implements hook_hook_info().
- */
-function payment_hook_info() {
-  return \Drupal::service('payment.hook.hook_info')->invoke();
-}
-
-/**
  * Implements hook_entity_extra_field_info().
  */
 function payment_entity_extra_field_info() {
diff --git a/payment/payment.services.yml b/payment/payment.services.yml
index 5a30d9d..886f2d0 100644
--- a/payment/payment.services.yml
+++ b/payment/payment.services.yml
@@ -40,8 +40,6 @@ services:
   payment.hook.entity_extra_field_info:
     class: Drupal\payment\Hook\EntityExtraFieldInfo
     arguments: ['@string_translation', '@plugin.manager.payment.type']
-  payment.hook.hook_info:
-    class: Drupal\payment\Hook\HookInfo
   payment.hook.entity_bundle_info:
     class: Drupal\payment\Hook\EntityBundleInfo
     arguments: ['@plugin.manager.payment.type', '@plugin.manager.payment.method_configuration']
diff --git a/payment/src/Entity/Payment.php b/payment/src/Entity/Payment.php
index ec96854..110c8bb 100644
--- a/payment/src/Entity/Payment.php
+++ b/payment/src/Entity/Payment.php
@@ -234,17 +234,6 @@ class Payment extends ContentEntityBase implements PaymentInterface {
       $event_dispatcher = \Drupal::service('event_dispatcher');
       $event = new PaymentStatusSet($this, $previous_status);
       $event_dispatcher->dispatch(PaymentEvents::PAYMENT_STATUS_SET, $event);
-
-      $module_handler = \Drupal::moduleHandler();
-      foreach ($module_handler->getImplementations('payment_status_set') as $moduleName) {
-        $module_handler->invoke($moduleName, 'payment_status_set', array($this, $previous_status));
-        // If a hook invocation has added another log item, a new loop with
-        // invocations has already been executed and we don't need to continue
-        // with this one.
-        if ($this->getStatus()->getPluginId() != $status->getPluginId()) {
-          return NULL;
-        }
-      }
       // @todo Invoke Rules event.
     }
 
diff --git a/payment/src/Event/PaymentEvents.php b/payment/src/Event/PaymentEvents.php
index 63c2e73..0ae5671 100644
--- a/payment/src/Event/PaymentEvents.php
+++ b/payment/src/Event/PaymentEvents.php
@@ -16,7 +16,6 @@ final class PaymentEvents {
    * The name of the event that is fired when payment execution access is
    * checked.
    *
-   * @see hook_payment_execute_access()
    * @see \Drupal\payment\Event\PaymentExecuteAccess
    */
   const PAYMENT_EXECUTE_ACCESS = 'drupal.payment.payment_execute_access';
@@ -24,7 +23,6 @@ final class PaymentEvents {
   /**
    * The name of the event that is fired before a payment is executed.
    *
-   * @see hook_payment_pre_execute()
    * @see \Drupal\payment\Event\PaymentPreExecute
    */
   const PAYMENT_PRE_EXECUTE = 'drupal.payment.payment_pre_execute';
@@ -32,7 +30,6 @@ final class PaymentEvents {
   /**
    * The name of the event that is fired before a payment is captured.
    *
-   * @see hook_payment_pre_capture()
    * @see \Drupal\payment\Event\PaymentPreCapture
    */
   const PAYMENT_PRE_CAPTURE = 'drupal.payment.payment_pre_capture';
@@ -40,7 +37,6 @@ final class PaymentEvents {
   /**
    * The name of the event that is fired before a payment is refunded.
    *
-   * @see hook_payment_pre_refunded()
    * @see \Drupal\payment\Event\PaymentPreRefund
    */
   const PAYMENT_PRE_REFUND = 'drupal.payment.payment_pre_refund';
@@ -48,7 +44,6 @@ final class PaymentEvents {
   /**
    * The name of the event that is fired after a new payment status is set.
    *
-   * @see hook_payment_status_set()
    * @see \Drupal\payment\Event\PaymentStatusSet
    */
   const PAYMENT_STATUS_SET = 'drupal.payment.payment_status_set';
@@ -57,7 +52,6 @@ final class PaymentEvents {
    * The name of the event that is fired before the payment type's original
    * context is resumed.
    *
-   * @see hook_payment_type_pre_resume_context()
    * @see \Drupal\payment\Event\PaymentTypePreResumeContext
    */
   const PAYMENT_TYPE_PRE_RESUME_CONTEXT = 'drupal.payment.payment_type_pre_resume_context';
@@ -66,7 +60,6 @@ final class PaymentEvents {
    * The name of the event that alters
    * \Drupal\payment\QueueInterface::loadPaymentIds() results.
    *
-   * @see hook_payment_queue_payment_ids_alter()
    * @see \Drupal\payment\Event\PaymentQueuePaymentIdsAlter
    */
   const PAYMENT_QUEUE_PAYMENT_IDS_ALTER = 'drupal.payment.payment_queue_payment_ids_alter';
diff --git a/payment/src/Hook/HookInfo.php b/payment/src/Hook/HookInfo.php
deleted file mode 100644
index 57fb4d5..0000000
--- a/payment/src/Hook/HookInfo.php
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\payment\Hook\HookInfo.
- */
-
-namespace Drupal\payment\Hook;
-
-/**
- * Implements hook_hook_info().
- *
- * @see payment_hook_info()
- */
-class HookInfo {
-
-  /**
-   * Invokes the implementation.
-   */
-  public function invoke() {
-    $hooks['payment_execute_access'] = array(
-      'group' => 'payment',
-    );
-    $hooks['payment_line_item_alter'] = array(
-      'group' => 'payment',
-    );
-    $hooks['payment_method_alter'] = array(
-      'group' => 'payment',
-    );
-    $hooks['payment_method_configuration_alter'] = array(
-      'group' => 'payment',
-    );
-    $hooks['payment_method_selector_alter'] = array(
-      'group' => 'payment',
-    );
-    $hooks['payment_pre_capture'] = array(
-      'group' => 'payment',
-    );
-    $hooks['payment_pre_execute'] = array(
-      'group' => 'payment',
-    );
-    $hooks['payment_pre_refund'] = array(
-      'group' => 'payment',
-    );
-    $hooks['payment_queue_payment_ids_alter'] = array(
-      'group' => 'payment',
-    );
-    $hooks['payment_status_alter'] = array(
-      'group' => 'payment',
-    );
-    $hooks['payment_status_set'] = array(
-      'group' => 'payment',
-    );
-    $hooks['payment_type_alter'] = array(
-      'group' => 'payment',
-    );
-    $hooks['payment_type_pre_resume_context'] = array(
-      'group' => 'payment',
-    );
-
-    return $hooks;
-  }
-
-}
diff --git a/payment/src/Plugin/Payment/Method/Basic.php b/payment/src/Plugin/Payment/Method/Basic.php
index 96d9f60..aec1b48 100644
--- a/payment/src/Plugin/Payment/Method/Basic.php
+++ b/payment/src/Plugin/Payment/Method/Basic.php
@@ -6,7 +6,6 @@
 
 namespace Drupal\payment\Plugin\Payment\Method;
 
-use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\Core\Session\AccountInterface;
 use Drupal\Core\Utility\Token;
@@ -54,8 +53,6 @@ class Basic extends PaymentMethodBase implements ContainerFactoryPluginInterface
    *   The plugin_id for the plugin instance.
    * @param array $plugin_definition
    *   The plugin implementation definition.
-   * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
-   *   The module handler.
    * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
    *   The event dispatcher.
    * @param \Drupal\Core\Utility\Token $token
@@ -63,9 +60,9 @@ class Basic extends PaymentMethodBase implements ContainerFactoryPluginInterface
    * @param \Drupal\payment\Plugin\Payment\Status\PaymentStatusManagerInterface
    *   The payment status manager.
    */
-  public function __construct(array $configuration, $plugin_id, array $plugin_definition, ModuleHandlerInterface $module_handler, EventDispatcherInterface $event_dispatcher, Token $token, PaymentStatusManagerInterface $payment_status_manager) {
+  public function __construct(array $configuration, $plugin_id, array $plugin_definition, EventDispatcherInterface $event_dispatcher, Token $token, PaymentStatusManagerInterface $payment_status_manager) {
     $configuration += $this->defaultConfiguration();
-    parent::__construct($configuration, $plugin_id, $plugin_definition, $module_handler, $event_dispatcher, $token);
+    parent::__construct($configuration, $plugin_id, $plugin_definition, $event_dispatcher, $token);
     $this->paymentStatusManager = $payment_status_manager;
   }
 
@@ -73,7 +70,7 @@ class Basic extends PaymentMethodBase implements ContainerFactoryPluginInterface
    * {@inheritdoc}
    */
   public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
-    return new static($configuration, $plugin_id, $plugin_definition, $container->get('module_handler'), $container->get('event_dispatcher'), $container->get('token'), $container->get('plugin.manager.payment.status'));
+    return new static($configuration, $plugin_id, $plugin_definition, $container->get('event_dispatcher'), $container->get('token'), $container->get('plugin.manager.payment.status'));
   }
 
   /**
diff --git a/payment/src/Plugin/Payment/Method/PaymentMethodBase.php b/payment/src/Plugin/Payment/Method/PaymentMethodBase.php
index 6a4f14b..d7da5c4 100644
--- a/payment/src/Plugin/Payment/Method/PaymentMethodBase.php
+++ b/payment/src/Plugin/Payment/Method/PaymentMethodBase.php
@@ -8,7 +8,6 @@ namespace Drupal\payment\Plugin\Payment\Method;
 
 use Drupal\Core\Access\AccessInterface;
 use Drupal\Core\Plugin\PluginBase;
-use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\Core\Session\AccountInterface;
 use Drupal\Core\Utility\Token;
@@ -40,13 +39,6 @@ abstract class PaymentMethodBase extends PluginBase implements AccessInterface,
   protected $eventDispatcher;
 
   /**
-   * The module handler.
-   *
-   * @var \Drupal\Core\Extension\ModuleHandlerInterface
-   */
-  protected $moduleHandler;
-
-  /**
    * The payment this payment method is for.
    *
    * @var \Drupal\payment\Entity\PaymentInterface
@@ -69,18 +61,15 @@ abstract class PaymentMethodBase extends PluginBase implements AccessInterface,
    *   The plugin_id for the plugin instance.
    * @param array $plugin_definition
    *   The plugin implementation definition.
-   * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
-   *   The module handler.
    * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
    *   The event dispatcher.
    * @param \Drupal\Core\Utility\Token $token
    *   The token API.
    */
-  public function __construct(array $configuration, $plugin_id, array $plugin_definition, ModuleHandlerInterface $module_handler, EventDispatcherInterface $event_dispatcher, Token $token) {
+  public function __construct(array $configuration, $plugin_id, array $plugin_definition, EventDispatcherInterface $event_dispatcher, Token $token) {
     $configuration += $this->defaultConfiguration();
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->eventDispatcher = $event_dispatcher;
-    $this->moduleHandler = $module_handler;
     $this->token = $token;
   }
 
@@ -88,7 +77,7 @@ abstract class PaymentMethodBase extends PluginBase implements AccessInterface,
    * {@inheritdoc}
    */
   public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
-    return new static($configuration, $plugin_id, $plugin_definition, $container->get('module_handler'), $container->get('event_dispatcher'), $container->get('token'));
+    return new static($configuration, $plugin_id, $plugin_definition, $container->get('event_dispatcher'), $container->get('token'));
   }
 
   /**
@@ -219,7 +208,6 @@ abstract class PaymentMethodBase extends PluginBase implements AccessInterface,
     }
     $event = new PaymentPreExecute($this->getPayment());
     $this->eventDispatcher->dispatch(PaymentEvents::PAYMENT_PRE_EXECUTE, $event);
-    $this->moduleHandler->invokeAll('payment_pre_execute', array($this->getPayment()));
     // @todo invoke Rules event.
     $this->doExecutePayment();
   }
@@ -258,7 +246,6 @@ abstract class PaymentMethodBase extends PluginBase implements AccessInterface,
     }
     $event = new PaymentPreCapture($this->getPayment());
     $this->eventDispatcher->dispatch(PaymentEvents::PAYMENT_PRE_CAPTURE, $event);
-    $this->moduleHandler->invokeAll('payment_pre_capture', array($this->getPayment()));
     // @todo invoke Rules event.
     $this->doCapturePayment();
   }
@@ -297,7 +284,6 @@ abstract class PaymentMethodBase extends PluginBase implements AccessInterface,
     }
     $event = new PaymentPreRefund($this->getPayment());
     $this->eventDispatcher->dispatch(PaymentEvents::PAYMENT_PRE_REFUND, $event);
-    $this->moduleHandler->invokeAll('payment_pre_refund', array($this->getPayment()));
     // @todo invoke Rules event.
     $this->doRefundPayment();
   }
@@ -363,11 +349,8 @@ abstract class PaymentMethodBase extends PluginBase implements AccessInterface,
     $event = new PaymentExecuteAccess($this->getPayment(), $this, $account);
     $this->eventDispatcher->dispatch(PaymentEvents::PAYMENT_EXECUTE_ACCESS, $event);
 
-    $hook_access_results = $this->moduleHandler->invokeAll('payment_execute_access', array($this->getPayment(), $this, $account));
-
-    $access_results = array_merge($event->getAccessResults(), $hook_access_results);
     // If there are no results, grant access.
-    return empty($access_results) || in_array(self::ALLOW, $access_results, TRUE) && !in_array(self::KILL, $access_results, TRUE);
+    return $event->getAccessResults() || in_array(self::ALLOW, $event->getAccessResults(), TRUE) && !in_array(self::KILL, $event->getAccessResults(), TRUE);
   }
 
   /**
diff --git a/payment/src/Plugin/Payment/Method/PaymentMethodCapturePaymentInterface.php b/payment/src/Plugin/Payment/Method/PaymentMethodCapturePaymentInterface.php
index dea47e1..7bd20ad 100644
--- a/payment/src/Plugin/Payment/Method/PaymentMethodCapturePaymentInterface.php
+++ b/payment/src/Plugin/Payment/Method/PaymentMethodCapturePaymentInterface.php
@@ -33,7 +33,7 @@ interface PaymentMethodCapturePaymentInterface {
   /**
    * Captures the payment.
    *
-   * Implementations must invoke hook_payment_pre_capture() and dispatch the
+   * Implementations must dispatch the
    * \Drupal\payment\Event\PaymentEvents::PAYMENT_PRE_CAPTURE Symfony event
    * before capture.
    *
diff --git a/payment/src/Plugin/Payment/Method/PaymentMethodRefundPaymentInterface.php b/payment/src/Plugin/Payment/Method/PaymentMethodRefundPaymentInterface.php
index fcae98d..4b0ea7d 100644
--- a/payment/src/Plugin/Payment/Method/PaymentMethodRefundPaymentInterface.php
+++ b/payment/src/Plugin/Payment/Method/PaymentMethodRefundPaymentInterface.php
@@ -33,7 +33,7 @@ interface PaymentMethodRefundPaymentInterface {
   /**
    * Refunds the payment.
    *
-   * Implementations must invoke hook_payment_pre_refund() and dispatch the
+   * Implementations must dispatch the
    * \Drupal\payment\Event\PaymentEvents::PAYMENT_PRE_REFUND Symfony event
    * before refunding the payment.
    *
diff --git a/payment/src/Plugin/Payment/Type/PaymentTypeBase.php b/payment/src/Plugin/Payment/Type/PaymentTypeBase.php
index ff41e76..c12e8b2 100644
--- a/payment/src/Plugin/Payment/Type/PaymentTypeBase.php
+++ b/payment/src/Plugin/Payment/Type/PaymentTypeBase.php
@@ -28,13 +28,6 @@ abstract class PaymentTypeBase extends PluginBase implements ContainerFactoryPlu
   protected $eventDispatcher;
 
   /**
-   * The module handler.
-   *
-   * @var \Drupal\Core\Extension\ModuleHandlerInterface
-   */
-  protected $moduleHandler;
-
-  /**
    * The payment this type is of.
    *
    * @var \Drupal\payment\Entity\PaymentInterface
@@ -50,23 +43,20 @@ abstract class PaymentTypeBase extends PluginBase implements ContainerFactoryPlu
    *   The plugin_id for the plugin instance.
    * @param array $plugin_definition
    *   The plugin implementation definition.
-   * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
-   *   The module handler.
    * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
    *   The event dispatcher.
    */
-  public function __construct(array $configuration, $plugin_id, array $plugin_definition, ModuleHandlerInterface $module_handler, EventDispatcherInterface $event_dispatcher) {
+  public function __construct(array $configuration, $plugin_id, array $plugin_definition, EventDispatcherInterface $event_dispatcher) {
     $configuration += $this->defaultConfiguration();
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->eventDispatcher = $event_dispatcher;
-    $this->moduleHandler = $module_handler;
   }
 
   /**
    * {@inheritdoc}
    */
   public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
-    return new static($configuration, $plugin_id, $plugin_definition, $container->get('module_handler'), $container->get('event_dispatcher'));
+    return new static($configuration, $plugin_id, $plugin_definition, $container->get('event_dispatcher'));
   }
 
   /**
@@ -119,7 +109,6 @@ abstract class PaymentTypeBase extends PluginBase implements ContainerFactoryPlu
   function resumeContext() {
     $event = new PaymentTypePreResumeContext($this->getPayment());
     $this->eventDispatcher->dispatch(PaymentEvents::PAYMENT_TYPE_PRE_RESUME_CONTEXT, $event);
-    $this->moduleHandler->invokeAll('payment_type_pre_resume_context', array($this->getPayment()));
     // @todo Invoke Rules event.
     $this->doResumeContext();
   }
diff --git a/payment/src/Plugin/Payment/Type/Unavailable.php b/payment/src/Plugin/Payment/Type/Unavailable.php
index 7d7a0fa..03596ee 100644
--- a/payment/src/Plugin/Payment/Type/Unavailable.php
+++ b/payment/src/Plugin/Payment/Type/Unavailable.php
@@ -38,8 +38,8 @@ class Unavailable extends PaymentTypeBase {
    * @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
    *   The string translator.
    */
-  public function __construct(array $configuration, $plugin_id, array $plugin_definition, ModuleHandlerInterface $module_handler, EventDispatcherInterface $event_dispatcher, TranslationInterface $string_translation) {
-    parent::__construct($configuration, $plugin_id, $plugin_definition, $module_handler, $event_dispatcher);
+  public function __construct(array $configuration, $plugin_id, array $plugin_definition, EventDispatcherInterface $event_dispatcher, TranslationInterface $string_translation) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition, $event_dispatcher);
     $this->stringTranslation = $string_translation;
   }
 
@@ -47,7 +47,7 @@ class Unavailable extends PaymentTypeBase {
    * {@inheritdoc}
    */
   public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
-    return new static($configuration, $plugin_id, $plugin_definition, $container->get('module_handler'), $container->get('event_dispatcher'), $container->get('string_translation'));
+    return new static($configuration, $plugin_id, $plugin_definition, $container->get('event_dispatcher'), $container->get('string_translation'));
   }
 
   /**
diff --git a/payment/src/Queue.php b/payment/src/Queue.php
index 2f772a5..3ac81ff 100644
--- a/payment/src/Queue.php
+++ b/payment/src/Queue.php
@@ -44,13 +44,6 @@ class Queue implements QueueInterface {
   const CLAIM_EXPIRATION_PERIOD = 1;
 
   /**
-   * The module handler.
-   *
-   * @var \Drupal\Core\Extension\ModuleHandlerInterface
-   */
-  protected $moduleHandler;
-
-  /**
    * The database connection.
    *
    * @var \Drupal\payment\Plugin\Payment\Status\PaymentStatusManagerInterface
@@ -78,17 +71,14 @@ class Queue implements QueueInterface {
    *   The unique ID of the queue (instance).
    * @param \Drupal\Core\Database\Connection $database
    *   A database connection.
-   * @param \Drupal\Core\Extension\ModuleHandlerInterface
-   *   The module handler.
    * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
    *   The event dispatcher.
    * @param \Drupal\payment\Plugin\Payment\Status\PaymentStatusManagerInterface
    *   The payment status plugin manager.
    */
-  public function __construct($queue_id, Connection $database, ModuleHandlerInterface $module_handler, EventDispatcherInterface $event_dispatcher, PaymentStatusManagerInterface $payment_status_manager) {
+  public function __construct($queue_id, Connection $database, EventDispatcherInterface $event_dispatcher, PaymentStatusManagerInterface $payment_status_manager) {
     $this->database = $database;
     $this->eventDispatcher = $event_dispatcher;
-    $this->moduleHandler = $module_handler;
     $this->paymentStatusManager = $payment_status_manager;
     $this->randomGenerator = new Random();
     $this->queueId = $queue_id;
@@ -209,7 +199,6 @@ class Queue implements QueueInterface {
     $event = new PaymentQueuePaymentIdsAlter($category_id, $owner_id, $payment_ids);
     $this->eventDispatcher->dispatch(PaymentEvents::PAYMENT_QUEUE_PAYMENT_IDS_ALTER, $event);
     $payment_ids = $event->getPaymentIds();
-    $this->moduleHandler->alter('payment_queue_payment_ids', $category_id, $owner_id, $payment_ids);
     // @todo Add a Rules event.
 
     return $payment_ids;
diff --git a/payment/src/Tests/QueueWebTest.php b/payment/src/Tests/QueueWebTest.php
index dd860b6..e94d373 100644
--- a/payment/src/Tests/QueueWebTest.php
+++ b/payment/src/Tests/QueueWebTest.php
@@ -107,7 +107,6 @@ class QueueWebTest extends WebTestBase {
     // Tests loadPaymentIds().
     $loaded_payment_ids = $this->queue->loadPaymentIds($category_id, $payment->getOwnerId());
     $this->assertEqual($loaded_payment_ids, array($payment->id()));
-    $this->assertTrue(\Drupal::state()->get('payment_test_payment_queue_payment_ids_alter'));
 
     // Tests deleteByPaymentId().
     $this->queue->deleteByPaymentId($payment->id());
diff --git a/payment/tests/src/Hook/HookInfoUnitTest.php b/payment/tests/src/Hook/HookInfoUnitTest.php
deleted file mode 100644
index 86d7dd6..0000000
--- a/payment/tests/src/Hook/HookInfoUnitTest.php
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\payment\Tests\Hook\HookInfoUnitTest.
- */
-
-namespace Drupal\payment\Tests\Hook;
-
-use Drupal\payment\Hook\HookInfo;
-use Drupal\Tests\UnitTestCase;
-
-/**
- * @coversDefaultClass \Drupal\payment\Hook\HookInfo
- *
- * @group Payment
- */
-class HookInfoUnitTest extends UnitTestCase {
-
-  /**
-   * The service under test.
-   *
-   * @var \Drupal\payment\Hook\HookInfo.
-   */
-  protected $service;
-
-  /**
-   * {@inheritdoc}
-   */
-  public function setUp() {
-    $this->service = new HookInfo();
-  }
-
-  /**
-   * @covers ::invoke
-   */
-  public function testInvoke() {
-    $hooks = $this->service->invoke();
-    $this->assertInternalType('array', $hooks);
-    foreach ($hooks as $hook) {
-      $this->assertInternalType('array', $hook);
-      $this->assertArrayHasKey('group', $hook);
-      $this->assertSame('payment', $hook['group']);
-    }
-  }
-
-  /**
-   * Tests if declared hooks are documented in payment.api.php and vice versa.
-   *
-   * @depends testInvoke
-   */
-  public function testDocumentation() {
-    $declared_hooks = array();
-    foreach (array_keys($this->service->invoke()) as $hook) {
-      $declared_hooks[] = 'hook_' . $hook;
-    }
-
-    $api_file_path = __DIR__ . '/../../../payment.api.php';
-    $tokens = token_get_all(file_get_contents($api_file_path));
-    $documented_hooks = array();
-    foreach ($tokens as $index => $token) {
-      if (is_array($token) && $token[0] == T_FUNCTION) {
-        $documented_hooks[] = $tokens[$index + 2][1];
-      }
-    }
-
-    // Compare the declared and documented hooks. If they are out of sync, at
-    // least one of the diffs will not be empty.
-    $this->assertEmpty(array_diff($declared_hooks, $documented_hooks));
-    $this->assertEmpty(array_diff($documented_hooks, $declared_hooks));
-  }
-}
diff --git a/payment/tests/src/Plugin/Payment/Method/BasicUnitTest.php b/payment/tests/src/Plugin/Payment/Method/BasicUnitTest.php
index 4f752f0..8e34908 100644
--- a/payment/tests/src/Plugin/Payment/Method/BasicUnitTest.php
+++ b/payment/tests/src/Plugin/Payment/Method/BasicUnitTest.php
@@ -50,7 +50,7 @@ class BasicUnitTest extends PaymentMethodBaseUnitTestBase {
 
     $this->paymentStatusManager = $this->getMock('\Drupal\payment\Plugin\Payment\Status\PaymentStatusManagerInterface');
 
-    $this->paymentMethod = new Basic(array(), '', $this->pluginDefinition, $this->moduleHandler, $this->eventDispatcher, $this->token, $this->paymentStatusManager);
+    $this->paymentMethod = new Basic(array(), '', $this->pluginDefinition, $this->eventDispatcher, $this->token, $this->paymentStatusManager);
   }
 
   /**
@@ -60,7 +60,6 @@ class BasicUnitTest extends PaymentMethodBaseUnitTestBase {
     $container = $this->getMock('\Symfony\Component\DependencyInjection\ContainerInterface');
     $map = array(
       array('event_dispatcher', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->eventDispatcher),
-      array('module_handler', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->moduleHandler),
       array('plugin.manager.payment.status', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->paymentStatusManager),
       array('token', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->token),
     );
@@ -187,7 +186,7 @@ class BasicUnitTest extends PaymentMethodBaseUnitTestBase {
     $this->pluginDefinition['capture'] = $capture;
     $this->pluginDefinition['capture_status_id'] = $capture_status_id;
 
-    $this->paymentMethod = new Basic(array(), '', $this->pluginDefinition, $this->moduleHandler, $this->eventDispatcher, $this->token, $this->paymentStatusManager);
+    $this->paymentMethod = new Basic(array(), '', $this->pluginDefinition, $this->eventDispatcher, $this->token, $this->paymentStatusManager);
 
     $capture_payment_status = $this->getMock('\Drupal\payment\Plugin\Payment\Status\PaymentStatusInterface');
     $capture_payment_status->expects($this->any())
@@ -268,7 +267,7 @@ class BasicUnitTest extends PaymentMethodBaseUnitTestBase {
     $this->pluginDefinition['refund'] = $refund;
     $this->pluginDefinition['refund_status_id'] = $refund_status_id;
 
-    $this->paymentMethod = new Basic(array(), '', $this->pluginDefinition, $this->moduleHandler, $this->eventDispatcher, $this->token, $this->paymentStatusManager);
+    $this->paymentMethod = new Basic(array(), '', $this->pluginDefinition, $this->eventDispatcher, $this->token, $this->paymentStatusManager);
 
     $payment_status = $this->getMock('\Drupal\payment\Plugin\Payment\Status\PaymentStatusInterface');
     $payment_status->expects($this->any())
diff --git a/payment/tests/src/Plugin/Payment/Method/PaymentMethodBaseUnitTest.php b/payment/tests/src/Plugin/Payment/Method/PaymentMethodBaseUnitTest.php
index d427e7d..9c02455 100644
--- a/payment/tests/src/Plugin/Payment/Method/PaymentMethodBaseUnitTest.php
+++ b/payment/tests/src/Plugin/Payment/Method/PaymentMethodBaseUnitTest.php
@@ -37,7 +37,7 @@ class PaymentMethodBaseUnitTest extends PaymentMethodBaseUnitTestBase {
     $this->pluginDefinition['label'] = $this->randomName();
 
     $this->plugin = $this->getMockBuilder('\Drupal\payment\Plugin\Payment\Method\PaymentMethodBase')
-      ->setConstructorArgs(array(array(), '', $this->pluginDefinition, $this->moduleHandler, $this->eventDispatcher, $this->token))
+      ->setConstructorArgs(array(array(), '', $this->pluginDefinition, $this->eventDispatcher, $this->token))
       ->getMockForAbstractClass();
   }
 
@@ -48,7 +48,6 @@ class PaymentMethodBaseUnitTest extends PaymentMethodBaseUnitTestBase {
     $container = $this->getMock('\Symfony\Component\DependencyInjection\ContainerInterface');
     $map = array(
       array('event_dispatcher', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->eventDispatcher),
-      array('module_handler', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->moduleHandler),
       array('token', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->token),
     );
     $container->expects($this->any())
@@ -178,9 +177,6 @@ class PaymentMethodBaseUnitTest extends PaymentMethodBaseUnitTestBase {
     $payment = $this->getMockBuilder('\Drupal\payment\Entity\Payment')
       ->disableOriginalConstructor()
       ->getMock();
-    $this->moduleHandler->expects($this->once())
-      ->method('invokeAll')
-      ->with('payment_pre_execute');
     $this->eventDispatcher->expects($this->once())
       ->method('dispatch')
       ->with(PaymentEvents::PAYMENT_PRE_EXECUTE);
@@ -216,7 +212,7 @@ class PaymentMethodBaseUnitTest extends PaymentMethodBaseUnitTestBase {
     $this->pluginDefinition['active'] = $active;
     /** @var \Drupal\payment\Plugin\Payment\Method\PaymentMethodBase|\PHPUnit_Framework_MockObject_MockObject $payment_method */
     $payment_method = $this->getMockBuilder('\Drupal\payment\Plugin\Payment\Method\PaymentMethodBase')
-      ->setConstructorArgs(array(array(), '', $this->pluginDefinition, $this->moduleHandler, $this->eventDispatcher, $this->token))
+      ->setConstructorArgs(array(array(), '', $this->pluginDefinition, $this->eventDispatcher, $this->token))
       ->setMethods(array('executePaymentAccessCurrency', 'executePaymentAccessEvent', 'doExecutePaymentAccess'))
       ->getMockForAbstractClass();
     $payment_method->expects($this->any())
@@ -328,10 +324,6 @@ class PaymentMethodBaseUnitTest extends PaymentMethodBaseUnitTestBase {
       ->method('dispatch')
       ->with(PaymentEvents::PAYMENT_PRE_REFUND, $this->isInstanceOf('\Drupal\payment\Event\PaymentPreRefund'));
 
-    $this->moduleHandler->expects($this->once())
-      ->method('invokeAll')
-      ->with('payment_pre_refund', array($payment));
-
     $this->plugin->setPayment($payment);
     $this->plugin->expects($this->once())
       ->method('doRefundPayment');
@@ -396,7 +388,7 @@ class PaymentMethodBaseUnitTest extends PaymentMethodBaseUnitTestBase {
    *
    * @dataProvider providerTestExecutePaymentAccessEvent
    */
-  public function testExecutePaymentAccessEvent($expected, $event_results, $hook_results) {
+  public function testExecutePaymentAccessEvent($expected, $event_results) {
     $payment = $this->getMockBuilder('\Drupal\payment\Entity\Payment')
       ->disableOriginalConstructor()
       ->getMock();
@@ -414,11 +406,6 @@ class PaymentMethodBaseUnitTest extends PaymentMethodBaseUnitTestBase {
         }
       }));
 
-    $this->moduleHandler->expects($this->once())
-      ->method('invokeAll')
-      ->with('payment_execute_access', array($payment, $this->plugin, $account))
-      ->will($this->returnValue($hook_results));
-
     $method = new \ReflectionMethod($this->plugin, 'executePaymentAccessEvent');
     $method->setAccessible(TRUE);
 
@@ -431,20 +418,15 @@ class PaymentMethodBaseUnitTest extends PaymentMethodBaseUnitTestBase {
   public function providerTestExecutePaymentAccessEvent() {
     return array(
       // No access results.
-      array(TRUE, array(), array()),
+      array(TRUE, array()),
       // Some access results, all positive.
-      array(TRUE, array(AccessInterface::ALLOW), array()),
-      array(TRUE, array(), array(AccessInterface::ALLOW)),
+      array(TRUE, array(AccessInterface::ALLOW)),
       // Both ALLOW and DENY, but no KILL, so access is granted.
-      array(TRUE, array(AccessInterface::ALLOW), array(AccessInterface::DENY)),
-      array(TRUE, array(AccessInterface::DENY), array(AccessInterface::ALLOW)),
+      array(TRUE, array(AccessInterface::ALLOW, AccessInterface::DENY)),
       // Various combinations of access denied.
-      array(FALSE, array(AccessInterface::DENY), array()),
-      array(FALSE, array(), array(AccessInterface::DENY)),
-      array(FALSE, array(AccessInterface::KILL), array()),
-      array(FALSE, array(), array(AccessInterface::KILL)),
-      array(FALSE, array(AccessInterface::KILL), array(AccessInterface::ALLOW)),
-      array(FALSE, array(AccessInterface::ALLOW), array(AccessInterface::KILL)),
+      array(FALSE, array(AccessInterface::DENY)),
+      array(FALSE, array(AccessInterface::KILL)),
+      array(FALSE, array(AccessInterface::KILL, AccessInterface::ALLOW)),
     );
   }
 
diff --git a/payment/tests/src/Plugin/Payment/Method/PaymentMethodBaseUnitTestBase.php b/payment/tests/src/Plugin/Payment/Method/PaymentMethodBaseUnitTestBase.php
index c6fe365..3a2d670 100644
--- a/payment/tests/src/Plugin/Payment/Method/PaymentMethodBaseUnitTestBase.php
+++ b/payment/tests/src/Plugin/Payment/Method/PaymentMethodBaseUnitTestBase.php
@@ -23,13 +23,6 @@ abstract class PaymentMethodBaseUnitTestBase extends UnitTestCase {
   protected $eventDispatcher;
 
   /**
-   * The module handler used for testing.
-   *
-   * @var \Drupal\Core\Extension\ModuleHandlerInterface|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $moduleHandler;
-
-  /**
    * The token API used for testing.
    *
    * @var \Drupal\Core\Utility\Token|\PHPUnit_Framework_MockObject_MockObject
@@ -58,8 +51,6 @@ abstract class PaymentMethodBaseUnitTestBase extends UnitTestCase {
 
     $this->eventDispatcher = $this->getMock('\Symfony\Component\EventDispatcher\EventDispatcherInterface');
 
-    $this->moduleHandler = $this->getMock('\Drupal\Core\Extension\ModuleHandlerInterface');
-
     $this->token = $this->getMockBuilder('\Drupal\Core\Utility\Token')
       ->disableOriginalConstructor()
       ->getMock();
diff --git a/payment/tests/src/Plugin/Payment/Method/UnavailableUnitTest.php b/payment/tests/src/Plugin/Payment/Method/UnavailableUnitTest.php
index 53d79e3..3febe07 100644
--- a/payment/tests/src/Plugin/Payment/Method/UnavailableUnitTest.php
+++ b/payment/tests/src/Plugin/Payment/Method/UnavailableUnitTest.php
@@ -44,8 +44,6 @@ class UnavailableUnitTest extends UnitTestCase {
   public function setUp() {
     parent::setUp();
 
-    $this->moduleHandler = $this->getMock('\Drupal\Core\Extension\ModuleHandlerInterface');
-
     $this->token = $this->getMockBuilder('\Drupal\Core\Utility\Token')
       ->disableOriginalConstructor()
       ->getMock();
@@ -56,7 +54,7 @@ class UnavailableUnitTest extends UnitTestCase {
       'label' => $this->randomName(),
     );
 
-    $this->plugin = new Unavailable(array(), '', $this->pluginDefinition, $this->moduleHandler, $this->token, $this->paymentStatusManager);
+    $this->plugin = new Unavailable(array(), '', $this->pluginDefinition, $this->token, $this->paymentStatusManager);
   }
 
   /**
diff --git a/payment/tests/src/Plugin/Payment/Type/PaymentTypeBaseUnitTest.php b/payment/tests/src/Plugin/Payment/Type/PaymentTypeBaseUnitTest.php
index 48da355..812f7e3 100644
--- a/payment/tests/src/Plugin/Payment/Type/PaymentTypeBaseUnitTest.php
+++ b/payment/tests/src/Plugin/Payment/Type/PaymentTypeBaseUnitTest.php
@@ -26,13 +26,6 @@ class PaymentTypeBaseUnitTest extends UnitTestCase {
   protected $eventDispatcher;
 
   /**
-   * The module handler.
-   *
-   * @var \Drupal\Core\Extension\ModuleHandlerInterface|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $moduleHandler;
-
-  /**
    * The payment type under test.
    *
    * @var \Drupal\payment\Plugin\Payment\Type\PaymentTypeBase|\PHPUnit_Framework_MockObject_MockObject
@@ -47,13 +40,11 @@ class PaymentTypeBaseUnitTest extends UnitTestCase {
   public function setUp() {
     $this->eventDispatcher = $this->getMock('\Symfony\Component\EventDispatcher\EventDispatcherInterface');
 
-    $this->moduleHandler = $this->getMock('\Drupal\Core\Extension\ModuleHandlerInterface');
-
     $configuration = array();
     $plugin_id = $this->randomName();
     $plugin_definition = array();
     $this->paymentType = $this->getMockBuilder('\Drupal\payment\Plugin\Payment\Type\PaymentTypeBase')
-      ->setConstructorArgs(array($configuration, $plugin_id, $plugin_definition, $this->moduleHandler, $this->eventDispatcher))
+      ->setConstructorArgs(array($configuration, $plugin_id, $plugin_definition, $this->eventDispatcher))
       ->getMockForAbstractClass();
   }
 
@@ -64,7 +55,6 @@ class PaymentTypeBaseUnitTest extends UnitTestCase {
     $container = $this->getMock('\Symfony\Component\DependencyInjection\ContainerInterface');
     $map = array(
       array('event_dispatcher', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->eventDispatcher),
-      array('module_handler', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->moduleHandler),
     );
     $container->expects($this->any())
       ->method('get')
@@ -126,10 +116,6 @@ class PaymentTypeBaseUnitTest extends UnitTestCase {
       ->getMock();
     $this->paymentType->setPayment($payment);
 
-    $this->moduleHandler->expects($this->once())
-      ->method('invokeAll')
-      ->with('payment_type_pre_resume_context');
-
     $this->eventDispatcher->expects($this->once())
       ->method('dispatch')
       ->with(PaymentEvents::PAYMENT_TYPE_PRE_RESUME_CONTEXT);
diff --git a/payment/tests/src/Plugin/Payment/Type/UnavailableUnitTest.php b/payment/tests/src/Plugin/Payment/Type/UnavailableUnitTest.php
index e669459..5a82b71 100644
--- a/payment/tests/src/Plugin/Payment/Type/UnavailableUnitTest.php
+++ b/payment/tests/src/Plugin/Payment/Type/UnavailableUnitTest.php
@@ -26,13 +26,6 @@ class UnavailableUnitTest extends UnitTestCase {
   protected $eventDispatcher;
 
   /**
-   * The module handler used for testing.
-   *
-   * @var \Drupal\Core\Extension\ModuleHandlerInterface|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $moduleHandler;
-
-  /**
    * The payment type under test.
    *
    * @var \Drupal\payment\Plugin\Payment\Type\Unavailable|\PHPUnit_Framework_MockObject_MockObject
@@ -54,8 +47,6 @@ class UnavailableUnitTest extends UnitTestCase {
   public function setUp() {
     $this->eventDispatcher = $this->getMock('\Symfony\Component\EventDispatcher\EventDispatcherInterface');
 
-    $this->moduleHandler = $this->getMock('\Drupal\Core\Extension\ModuleHandlerInterface');
-
     $this->stringTranslation = $this->getMock('\Drupal\Core\StringTranslation\TranslationInterface');
     $this->stringTranslation->expects($this->any())
       ->method('translate')
@@ -64,7 +55,7 @@ class UnavailableUnitTest extends UnitTestCase {
     $configuration = array();
     $plugin_id = $this->randomName();
     $plugin_definition = array();
-    $this->paymentType = new Unavailable($configuration, $plugin_id, $plugin_definition, $this->moduleHandler, $this->eventDispatcher, $this->stringTranslation);
+    $this->paymentType = new Unavailable($configuration, $plugin_id, $plugin_definition, $this->eventDispatcher, $this->stringTranslation);
   }
 
   /**
@@ -74,7 +65,6 @@ class UnavailableUnitTest extends UnitTestCase {
     $container = $this->getMock('\Symfony\Component\DependencyInjection\ContainerInterface');
     $map = array(
       array('event_dispatcher', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->eventDispatcher),
-      array('module_handler', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->moduleHandler),
       array('string_translation', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->stringTranslation),
     );
     $container->expects($this->any())
diff --git a/payment/tests/src/QueueUnitTest.php b/payment/tests/src/QueueUnitTest.php
index 23a571d..4c9f671 100644
--- a/payment/tests/src/QueueUnitTest.php
+++ b/payment/tests/src/QueueUnitTest.php
@@ -33,13 +33,6 @@ class QueueUnitTest extends UnitTestCase {
   protected $eventDispatcher;
 
   /**
-   * The module handler.
-   *
-   * @var \Drupal\Core\Extension\ModuleHandlerInterface|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $moduleHandler;
-
-  /**
    * The database connection.
    *
    * @var \Drupal\payment\Plugin\Payment\Status\PaymentStatusManagerInterface|\PHPUnit_Framework_MockObject_MockObject
@@ -73,15 +66,13 @@ class QueueUnitTest extends UnitTestCase {
 
     $this->eventDispatcher = $this->getMock('\Symfony\Component\EventDispatcher\EventDispatcherInterface');
 
-    $this->moduleHandler = $this->getMock('\Drupal\Core\Extension\ModuleHandlerInterface');
-
     $this->paymentMethodManager = $this->getMock('\Drupal\payment\Plugin\Payment\Method\PaymentMethodManagerInterface');
 
     $this->paymentStatusManager = $this->getMock('\Drupal\payment\Plugin\Payment\Status\PaymentStatusManagerInterface');
 
     $this->queueId = $this->randomName();
 
-    $this->queue = new Queue($this->queueId, $this->database, $this->moduleHandler, $this->eventDispatcher, $this->paymentStatusManager);
+    $this->queue = new Queue($this->queueId, $this->database, $this->eventDispatcher, $this->paymentStatusManager);
   }
 
   /**
@@ -92,10 +83,6 @@ class QueueUnitTest extends UnitTestCase {
     $owner_id = $this->randomName();
     $payment_ids = array($this->randomName());
 
-    $this->moduleHandler->expects($this->once())
-      ->method('alter')
-      ->with('payment_queue_payment_ids', $category_id, $owner_id, $payment_ids);
-
     $this->eventDispatcher->expects($this->once())
       ->method('dispatch')
       ->with(PaymentEvents::PAYMENT_QUEUE_PAYMENT_IDS_ALTER);
@@ -114,7 +101,7 @@ class QueueUnitTest extends UnitTestCase {
 
     /** @var \Drupal\payment\Queue|\PHPUnit_Framework_MockObject_MockObject $queue */
     $queue = $this->getMockBuilder('\Drupal\payment\Queue')
-      ->setConstructorArgs(array($this->queueId, $this->database, $this->moduleHandler, $this->eventDispatcher, $this->paymentStatusManager))
+      ->setConstructorArgs(array($this->queueId, $this->database, $this->eventDispatcher, $this->paymentStatusManager))
       ->setMethods(array('tryClaimPaymentOnce'))
       ->getMock();
     $queue->expects($this->at(0))
diff --git a/payment_form/src/Plugin/Payment/Type/PaymentForm.php b/payment_form/src/Plugin/Payment/Type/PaymentForm.php
index eab25f4..bf8cfae 100644
--- a/payment_form/src/Plugin/Payment/Type/PaymentForm.php
+++ b/payment_form/src/Plugin/Payment/Type/PaymentForm.php
@@ -7,8 +7,6 @@
 namespace Drupal\payment_form\Plugin\Payment\Type;
 
 use Drupal\Core\Entity\EntityManagerInterface;
-use Drupal\Core\Extension\ModuleHandlerInterface;
-use Drupal\Core\HttpKernel;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\Core\StringTranslation\TranslationInterface;
 use Drupal\payment\Plugin\Payment\Type\PaymentTypeBase;
@@ -52,8 +50,6 @@ class PaymentForm extends PaymentTypeBase implements ContainerFactoryPluginInter
    *   The plugin_id for the plugin instance.
    * @param array $plugin_definition
    *   The plugin implementation definition.
-   * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
-   *   The module handler.
    * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
    *   The event dispatcher.
    * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
@@ -61,8 +57,8 @@ class PaymentForm extends PaymentTypeBase implements ContainerFactoryPluginInter
    * @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
    *   The string translator.
    */
-  public function __construct(array $configuration, $plugin_id, array $plugin_definition, ModuleHandlerInterface $module_handler, EventDispatcherInterface $event_dispatcher, EntityManagerInterface $entity_manager, TranslationInterface $string_translation) {
-    parent::__construct($configuration, $plugin_id, $plugin_definition, $module_handler, $event_dispatcher);
+  public function __construct(array $configuration, $plugin_id, array $plugin_definition, EventDispatcherInterface $event_dispatcher, EntityManagerInterface $entity_manager, TranslationInterface $string_translation) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition, $event_dispatcher);
     $this->entityManager = $entity_manager;
     $this->stringTranslation = $string_translation;
   }
@@ -75,7 +71,6 @@ class PaymentForm extends PaymentTypeBase implements ContainerFactoryPluginInter
       $configuration,
       $plugin_id,
       $plugin_definition,
-      $container->get('module_handler'),
       $container->get('event_dispatcher'),
       $container->get('entity.manager'),
       $container->get('string_translation')
diff --git a/payment_form/tests/src/Plugin/Payment/Type/PaymentFormUnitTest.php b/payment_form/tests/src/Plugin/Payment/Type/PaymentFormUnitTest.php
index b62f8ac..c8f70ce 100644
--- a/payment_form/tests/src/Plugin/Payment/Type/PaymentFormUnitTest.php
+++ b/payment_form/tests/src/Plugin/Payment/Type/PaymentFormUnitTest.php
@@ -37,13 +37,6 @@ class PaymentFormUnitTest extends UnitTestCase {
   protected $eventDispatcher;
 
   /**
-   * The module handler used for testing.
-   *
-   * @var \Drupal\Core\Extension\ModuleHandlerInterface|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $moduleHandler;
-
-  /**
    * The payment used for testing.
    *
    * @var \Drupal\payment\Entity\PaymentInterface|\PHPUnit_Framework_MockObject_MockObject
@@ -74,11 +67,9 @@ class PaymentFormUnitTest extends UnitTestCase {
 
     $this->eventDispatcher = $this->getMock('\Symfony\Component\EventDispatcher\EventDispatcherInterface');
 
-    $this->moduleHandler = $this->getMock('\Drupal\Core\Extension\ModuleHandlerInterface');
-
     $this->stringTranslation = $this->getStringTranslationStub();
 
-    $this->paymentType = new PaymentForm(array(), 'payment_form', array(), $this->moduleHandler, $this->eventDispatcher, $this->entityManager, $this->stringTranslation);
+    $this->paymentType = new PaymentForm(array(), 'payment_form', array(), $this->eventDispatcher, $this->entityManager, $this->stringTranslation);
 
     $this->payment = $this->getMockBuilder('\Drupal\payment\Entity\Payment')
       ->disableOriginalConstructor()
@@ -94,7 +85,6 @@ class PaymentFormUnitTest extends UnitTestCase {
     $map = array(
       array('entity.manager', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->entityManager),
       array('event_dispatcher', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->eventDispatcher),
-      array('module_handler', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->moduleHandler),
       array('string_translation', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->stringTranslation),
     );
     $container->expects($this->any())
diff --git a/payment_reference/payment_reference.services.yml b/payment_reference/payment_reference.services.yml
index 405de6c..4bd7840 100644
--- a/payment_reference/payment_reference.services.yml
+++ b/payment_reference/payment_reference.services.yml
@@ -1,4 +1,4 @@
 services:
   payment_reference.queue:
-    arguments: ['payment_reference', '@database', '@module_handler', '@event_dispatcher', '@plugin.manager.payment.status']
+    arguments: ['payment_reference', '@database', '@event_dispatcher', '@plugin.manager.payment.status']
     class: Drupal\payment\Queue
\ No newline at end of file
diff --git a/payment_reference/src/Plugin/Payment/Type/PaymentReference.php b/payment_reference/src/Plugin/Payment/Type/PaymentReference.php
index bcd9392..6d42462 100644
--- a/payment_reference/src/Plugin/Payment/Type/PaymentReference.php
+++ b/payment_reference/src/Plugin/Payment/Type/PaymentReference.php
@@ -52,8 +52,6 @@ class PaymentReference extends PaymentTypeBase implements ContainerFactoryPlugin
    *   The plugin_id for the plugin instance.
    * @param array $plugin_definition
    *   The plugin implementation definition.
-   * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
-   *   The module handler.
    * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
    *   The event dispatcher.
    * @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator
@@ -63,9 +61,9 @@ class PaymentReference extends PaymentTypeBase implements ContainerFactoryPlugin
    * @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
    *   The string translator.
    */
-  public function __construct(array $configuration, $plugin_id, array $plugin_definition, ModuleHandlerInterface $module_handler , EventDispatcherInterface $event_dispatcher, UrlGeneratorInterface $url_generator, EntityManagerInterface $entity_manager, TranslationInterface $string_translation) {
+  public function __construct(array $configuration, $plugin_id, array $plugin_definition, EventDispatcherInterface $event_dispatcher, UrlGeneratorInterface $url_generator, EntityManagerInterface $entity_manager, TranslationInterface $string_translation) {
     $configuration += $this->defaultConfiguration();
-    parent::__construct($configuration, $plugin_id, $plugin_definition, $module_handler, $event_dispatcher);
+    parent::__construct($configuration, $plugin_id, $plugin_definition, $event_dispatcher);
     $this->urlGenerator = $url_generator;
     $this->entityManager = $entity_manager;
     $this->stringTranslation = $string_translation;
@@ -79,7 +77,6 @@ class PaymentReference extends PaymentTypeBase implements ContainerFactoryPlugin
       $configuration,
       $plugin_id,
       $plugin_definition,
-      $container->get('module_handler'),
       $container->get('event_dispatcher'),
       $container->get('url_generator'),
       $container->get('entity.manager'),
diff --git a/payment_reference/tests/src/Plugin/Payment/Type/PaymentReferenceUnitTest.php b/payment_reference/tests/src/Plugin/Payment/Type/PaymentReferenceUnitTest.php
index aeafe2b..52134b9 100644
--- a/payment_reference/tests/src/Plugin/Payment/Type/PaymentReferenceUnitTest.php
+++ b/payment_reference/tests/src/Plugin/Payment/Type/PaymentReferenceUnitTest.php
@@ -37,13 +37,6 @@ class PaymentReferenceUnitTest extends UnitTestCase {
   protected $entityManager;
 
   /**
-   * The module handler used for testing.
-   *
-   * @var \Drupal\Core\Extension\ModuleHandlerInterface|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $moduleHandler;
-
-  /**
    * The payment used for testing.
    *
    * @var \Drupal\payment\Entity\PaymentInterface|\PHPUnit_Framework_MockObject_MockObject
@@ -86,11 +79,9 @@ class PaymentReferenceUnitTest extends UnitTestCase {
       ->method('generateFromRoute')
       ->will($this->returnValue('http://example.com'));
 
-    $this->moduleHandler = $this->getMock('\Drupal\Core\Extension\ModuleHandlerInterface');
-
     $this->stringTranslation = $this->getStringTranslationStub();
 
-    $this->paymentType = new PaymentReference(array(), 'payment_reference', array(), $this->moduleHandler, $this->eventDispatcher, $this->urlGenerator, $this->entityManager, $this->stringTranslation);
+    $this->paymentType = new PaymentReference(array(), 'payment_reference', array(), $this->eventDispatcher, $this->urlGenerator, $this->entityManager, $this->stringTranslation);
 
     $this->payment = $this->getMockBuilder('\Drupal\payment\Entity\Payment')
       ->disableOriginalConstructor()
@@ -106,7 +97,6 @@ class PaymentReferenceUnitTest extends UnitTestCase {
     $map = array(
       array('entity.manager', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->entityManager),
       array('event_dispatcher', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->eventDispatcher),
-      array('module_handler', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->moduleHandler),
       array('string_translation', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->stringTranslation),
       array('url_generator', ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $this->urlGenerator),
     );
diff --git a/payment_test/payment_test.module b/payment_test/payment_test.module
index 1af772d..e69de29 100644
--- a/payment_test/payment_test.module
+++ b/payment_test/payment_test.module
@@ -1,23 +0,0 @@
-<?php
-
-/**
- * @file
- * Hook implementations and shared functions.
- */
-
-use Drupal\payment\Entity\PaymentInterface;
-use Drupal\payment\Plugin\Payment\Status\PaymentStatusInterface;
-
-/**
- * Implements hook_payment_status_set().
- */
-function payment_test_payment_status_set(PaymentInterface $payment, PaymentStatusInterface $previous_status = NULL) {
-  \Drupal::state()->set('payment_test_payment_status_set', TRUE);
-}
-
-/**
- * Implements hook_payment_queue_payment_ids_alter().
- */
-function payment_test_payment_queue_payment_ids_alter($field_instance_config_id, $owner_id, array &$payment_ids) {
-  \Drupal::state()->set('payment_test_payment_queue_payment_ids_alter', TRUE);
-}
