diff --git a/payment/uc_payment_pack/lib/Drupal/uc_payment_pack/Form/ReceiveCheckForm.php b/payment/uc_payment_pack/lib/Drupal/uc_payment_pack/Form/ReceiveCheckForm.php
index 643ab50..78534d5 100644
--- a/payment/uc_payment_pack/lib/Drupal/uc_payment_pack/Form/ReceiveCheckForm.php
+++ b/payment/uc_payment_pack/lib/Drupal/uc_payment_pack/Form/ReceiveCheckForm.php
@@ -8,6 +8,7 @@
 namespace Drupal\uc_payment_pack\Form;
 
 use Drupal\Core\Form\FormBase;
+use Drupal\uc_order\UcOrderInterface;
 
 /**
  * Form for recording received checks.
@@ -26,7 +27,7 @@ class ReceiveCheckForm extends FormBase {
    *
    * Receives a check for an order and put in a clear date.
    */
-  public function buildForm(array $form, array &$form_state, $order) {
+  public function buildForm(array $form, array &$form_state, UcOrderInterface $order = NULL) {
     $balance = uc_payment_balance($order);
     $form['balance'] = array(
       '#prefix' => '<strong>' . t('Order balance:') . '</strong> ',
@@ -62,6 +63,8 @@ class ReceiveCheckForm extends FormBase {
       '#type' => 'submit',
       '#value' => t('Receive check'),
     );
+
+    return $form;
   }
 
   /**
diff --git a/payment/uc_payment_pack/lib/Drupal/uc_payment_pack/Plugin/Ubercart/PaymentMethod/CashOnDelivery.php b/payment/uc_payment_pack/lib/Drupal/uc_payment_pack/Plugin/Ubercart/PaymentMethod/CashOnDelivery.php
new file mode 100644
index 0000000..e09924f
--- /dev/null
+++ b/payment/uc_payment_pack/lib/Drupal/uc_payment_pack/Plugin/Ubercart/PaymentMethod/CashOnDelivery.php
@@ -0,0 +1,224 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\uc_payment_pack\Plugin\Ubercart\PaymentMethod\CashOnDelivery.
+ */
+
+namespace Drupal\uc_payment_pack\Plugin\Ubercart\PaymentMethod;
+
+use Drupal\uc_order\UcOrderInterface;
+use Drupal\uc_payment\PaymentMethodPluginBase;
+
+/**
+ * Defines the cash on delivery payment method.
+ *
+ * @Plugin(
+ *   id = "cod",
+ *   name = @Translation("Cash on delivery"),
+ *   title = @Translation("Cash on delivery"),
+ *   description = @Translation("Pay cash on delivery on pick-up."),
+ *   checkout = FALSE,
+ *   no_gateway = TRUE,
+ *   configurable = TRUE,
+ *   weight = 1,
+ * )
+ */
+class CashOnDelivery extends PaymentMethodPluginBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function cartDetails(UcOrderInterface $order, array $form, array &$form_state) {
+    $cod_config = \Drupal::config('uc_cod.settings');
+
+    $build['policy'] = array(
+      '#markup' => '<p>' . $cod_config->get('policy') . '</p>'
+    );
+
+    if (($max = $cod_config->get('max_order')) > 0 && is_numeric($max)) {
+      $build['eligibility'] = array(
+        '#markup' => '<p>' . t('Orders totalling more than !number are <b>not eligible</b> for COD.', array('!number' => uc_currency_format($max))) . '</p>'
+      );
+    }
+
+    if ($cod_config->get('delivery_date')) {
+      $build += $this->deliveryDateForm($order);
+    }
+
+    return $build;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function cartProcess(UcOrderInterface $order, array $form, array &$form_state) {
+    $cod_config = \Drupal::config('uc_cod.settings');
+
+    if ($cod_config->get('delivery_date')) {
+      $order->payment_details = $form_state['values']['panes']['payment']['details'];
+    }
+
+    return TRUE;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function cartReview(UcOrderInterface $order) {
+    $cod_config = \Drupal::config('uc_cod.settings');
+
+    $review = array();
+
+    if ($cod_config->get('delivery_date')) {
+      $date = uc_date_format(
+        $order->payment_details['delivery_month'],
+        $order->payment_details['delivery_day'],
+        $order->payment_details['delivery_year']
+      );
+      $review[] = array('title' => t('Delivery date'), 'data' => $date);
+    }
+
+    return $review;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function orderView(UcOrderInterface $order) {
+    $cod_config = \Drupal::config('uc_cod.settings');
+
+    $build = array();
+
+    if ($cod_config->get('delivery_date') &&
+      isset($order->payment_details['delivery_month']) &&
+      isset($order->payment_details['delivery_day']) &&
+      isset($order->payment_details['delivery_year'])) {
+      $build['#markup'] = t('Desired delivery date:') . '<br />' .
+        uc_date_format(
+          $order->payment_details['delivery_month'],
+          $order->payment_details['delivery_day'],
+          $order->payment_details['delivery_year']
+        );
+    }
+
+    return $build;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function orderEditDetails(UcOrderInterface $order) {
+    $cod_config = \Drupal::config('uc_cod.settings');
+
+    $build = array();
+
+    if ($cod_config->get('delivery_date')) {
+      $build = $this->deliveryDateForm($order);
+    }
+
+    return $build;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function orderLoad(UcOrderInterface $order) {
+    $result = db_query('SELECT * FROM {uc_payment_cod} WHERE order_id = :id', array(':id' => $order->id()));
+    if ($row = $result->fetchObject()) {
+      $order->payment_details = array(
+        'delivery_month' => $row->delivery_month,
+        'delivery_day'   => $row->delivery_day,
+        'delivery_year'  => $row->delivery_year,
+      );
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function orderSave(UcOrderInterface $order) {
+    if (isset($order->payment_details['delivery_month']) &&
+        isset($order->payment_details['delivery_day']) &&
+        isset($order->payment_details['delivery_year'])) {
+      db_merge('uc_payment_cod')
+        ->key(array('order_id' => $order->id()))
+        ->fields(array(
+          'delivery_month' => $order->payment_details['delivery_month'],
+          'delivery_day'   => $order->payment_details['delivery_day'],
+          'delivery_year'  => $order->payment_details['delivery_year'],
+        ))
+        ->execute();
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function orderSubmit(UcOrderInterface $order) {
+    $cod_config = \Drupal::config('uc_cod.settings');
+    $max = $cod_config->get('max_order');
+
+    if ($max > 0 && $order->getTotal() > $max) {
+      $result[] = array(
+        'pass' => FALSE,
+        'message' => t('Your final order total exceeds the maximum for COD payment.  Please go back and select a different method of payment.')
+      );
+      return $result;
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function orderDelete(UcOrderInterface $order) {
+    db_delete('uc_payment_cod')
+      ->condition('order_id', $order->id())
+      ->execute();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function settingsForm(array $form, array &$form_state) {
+    $cod_config = \Drupal::config('uc_cod.settings');
+
+    $form['uc_cod_policy'] = array(
+      '#type' => 'textarea',
+      '#title' => t('Policy message'),
+      '#default_value' => $cod_config->get('policy'),
+      '#description' => t('Help message shown at checkout.'),
+    );
+    $form['uc_cod_max_order'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Maximum order total eligible for COD'),
+      '#default_value' => $cod_config->get('max_order'),
+      '#description' => t('Set to 0 for no maximum order limit.'),
+    );
+    $form['uc_cod_delivery_date'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Let customers enter a desired delivery date.'),
+      '#default_value' => $cod_config->get('delivery_date'),
+    );
+    return $form;
+  }
+
+  /**
+   * Collect additional information for the "Cash on Delivery" payment method.
+   */
+  protected function deliveryDateForm($order) {
+    $month = !empty($order->payment_details['delivery_month']) ? $order->payment_details['delivery_month'] : format_date(REQUEST_TIME, 'custom', 'n');
+    $day   = !empty($order->payment_details['delivery_day'])   ? $order->payment_details['delivery_day']   : format_date(REQUEST_TIME, 'custom', 'j');
+    $year  = !empty($order->payment_details['delivery_year'])  ? $order->payment_details['delivery_year']  : format_date(REQUEST_TIME, 'custom', 'Y');
+
+    $form['description'] = array(
+      '#markup' => '<div>' . t('Enter a desired delivery date:') . '</div>',
+    );
+    $form['delivery_month'] = uc_select_month(NULL, $month);
+    $form['delivery_day']   = uc_select_day(NULL, $day);
+    $form['delivery_year']  = uc_select_year(NULL, $year, format_date(REQUEST_TIME, 'custom', 'Y'), format_date(REQUEST_TIME, 'custom', 'Y') + 1);
+
+    return $form;
+  }
+
+}
diff --git a/payment/uc_payment_pack/lib/Drupal/uc_payment_pack/Plugin/Ubercart/PaymentMethod/Check.php b/payment/uc_payment_pack/lib/Drupal/uc_payment_pack/Plugin/Ubercart/PaymentMethod/Check.php
new file mode 100644
index 0000000..314282a
--- /dev/null
+++ b/payment/uc_payment_pack/lib/Drupal/uc_payment_pack/Plugin/Ubercart/PaymentMethod/Check.php
@@ -0,0 +1,174 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\uc_payment_pack\Plugin\Ubercart\PaymentMethod\Check.
+ */
+
+namespace Drupal\uc_payment_pack\Plugin\Ubercart\PaymentMethod;
+
+use Drupal\uc_order\UcOrderInterface;
+use Drupal\uc_payment\PaymentMethodPluginBase;
+
+/**
+ * Defines the check payment method.
+ *
+ * @Plugin(
+ *   id = "check",
+ *   name = @Translation("Check", context = "cheque"),
+ *   title = @Translation("Check or money order"),
+ *   description = @Translation("Pay by mailing a check or money order."),
+ *   checkout = TRUE,
+ *   no_gateway = TRUE,
+ *   configurable = TRUE,
+ *   weight = 1,
+ * )
+ */
+class Check extends PaymentMethodPluginBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function cartDetails(UcOrderInterface $order, array $form, array &$form_state) {
+    $check_config = \Drupal::config('uc_check.settings');
+
+    $build['instructions'] = array(
+      '#markup' => t('Checks should be made out to:')
+    );
+
+    if (!$check_config->get('mailing_street1')) {
+      $build['address'] = array(
+        '#markup' => uc_store_address(),
+        '#prefix' => '<p>',
+        '#suffix' => '</p>',
+      );
+    }
+    else {
+      $build['address'] = array(
+        '#markup' => uc_address_format(
+          $check_config->get('mailing_name'),
+          NULL,
+          $check_config->get('mailing_company'),
+          $check_config->get('mailing_street1'),
+          $check_config->get('mailing_street2'),
+          $check_config->get('mailing_city'),
+          $check_config->get('mailing_zone'),
+          $check_config->get('mailing_postal_code'),
+          $check_config->get('mailing_country')
+        ),
+        '#prefix' => '<p>',
+        '#suffix' => '</p>',
+      );
+    }
+
+    $build['policy'] = array(
+      '#markup' => '<p>' . $check_config->get('policy') . '</p>'
+    );
+
+    return $build;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function cartReview(UcOrderInterface $order) {
+    $check_config = \Drupal::config('uc_check.settings');
+
+    if (!$check_config->get('mailing_street1')) {
+      $review[] = array(
+        'title' => t('Mail to'),
+        'data' => uc_store_address(),
+      );
+    }
+    else {
+      $review[] = array(
+        'title' => t('Mail to'),
+        'data' => uc_address_format(
+          $check_config->get('mailing_name'),
+          NULL,
+          $check_config->get('mailing_company'),
+          $check_config->get('mailing_street1'),
+          $check_config->get('mailing_street2'),
+          $check_config->get('mailing_city'),
+          $check_config->get('mailing_zone'),
+          $check_config->get('mailing_postal_code'),
+          $check_config->get('mailing_country')
+        )
+      );
+    }
+
+    return $review;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function orderView(UcOrderInterface $order) {
+    $build = array('#suffix' => '<br />');
+
+    $result = db_query('SELECT clear_date FROM {uc_payment_check} WHERE order_id = :id ', array(':id' => $order->id()));
+    if ($clear_date = $result->fetchField()) {
+      $build['#markup'] = t('Clear Date:') . ' ' . format_date($clear_date, 'uc_store');
+    }
+    else {
+      $build['#markup'] = l(t('Receive Check'), 'admin/store/orders/' . $order->id() . '/receive_check');
+    }
+
+    return $build;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function customerView(UcOrderInterface $order) {
+    $build = array();
+
+    $result = db_query('SELECT clear_date FROM {uc_payment_check} WHERE order_id = :id ', array(':id' => $order->id()));
+    if ($clear_date = $result->fetchField()) {
+      $build['#markup'] = t('Check received') . '<br />' .
+        t('Expected clear date:') . '<br />' . format_date($clear_date, 'uc_store');
+    }
+
+    return $build;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function settingsForm(array $form, array &$form_state) {
+    $check_config = \Drupal::config('uc_check.settings');
+
+    $form['check_address_info'] = array(
+      '#markup' => '<div>' . t('Set the mailing address to display to customers who choose this payment method during checkout.') . '</div>',
+    );
+    $form['uc_check_mailing_name'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Contact'),
+      '#description' => t('Direct checks to a person or department.'),
+      '#default_value' => $check_config->get('mailing_name'),
+    );
+    $form['uc_check_address'] = array(
+      '#type' => 'uc_address',
+      '#default_value' => array(
+        'uc_check_mailing_company' => $check_config->get('mailing_company'),
+        'uc_check_mailing_street1' => $check_config->get('mailing_street1'),
+        'uc_check_mailing_street2' => $check_config->get('mailing_street2'),
+        'uc_check_mailing_city' => $check_config->get('mailing_city'),
+        'uc_check_mailing_zone' => $check_config->get('mailing_zone'),
+        'uc_check_mailing_country' => isset($form_state['values']['uc_check_mailing_country']) ? $form_state['values']['uc_check_mailing_country'] : $check_config->get('uc_check_mailing_country'),
+        'uc_check_mailing_postal_code' => $check_config->get('mailing_postal_code'),
+      ),
+      '#required' => FALSE,
+      '#key_prefix' => 'uc_check_mailing',
+    );
+    $form['uc_check_policy'] = array(
+      '#type' => 'textarea',
+      '#title' => t('Check payment policy', array(), array('context' => 'cheque')),
+      '#description' => t('Instructions for customers on the checkout page.'),
+      '#default_value' => $check_config->get('policy'),
+      '#rows' => 3,
+    );
+    return $form;
+  }
+
+}
diff --git a/payment/uc_payment_pack/lib/Drupal/uc_payment_pack/Plugin/Ubercart/PaymentMethod/Other.php b/payment/uc_payment_pack/lib/Drupal/uc_payment_pack/Plugin/Ubercart/PaymentMethod/Other.php
new file mode 100644
index 0000000..67587f2
--- /dev/null
+++ b/payment/uc_payment_pack/lib/Drupal/uc_payment_pack/Plugin/Ubercart/PaymentMethod/Other.php
@@ -0,0 +1,83 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\uc_payment_pack\Plugin\Ubercart\PaymentMethod\Other.
+ */
+
+namespace Drupal\uc_payment_pack\Plugin\Ubercart\PaymentMethod;
+
+use Drupal\uc_order\UcOrderInterface;
+use Drupal\uc_payment\PaymentMethodPluginBase;
+
+/**
+ * Defines a generic payment method.
+ *
+ * @Plugin(
+ *   id = "other",
+ *   name = @Translation("Other"),
+ *   title = @Translation("Other"),
+ *   description = @Translation("A generic payment method type."),
+ *   checkout = FALSE,
+ *   no_gateway = TRUE,
+ *   configurable = FALSE,
+ *   weight = 10,
+ * )
+ */
+class Other extends PaymentMethodPluginBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function orderView(UcOrderInterface $order) {
+    if ($description = db_query('SELECT description FROM {uc_payment_other} WHERE order_id = :id', array(':id' => $order->id()))->fetchField()) {
+      return array('#markup' => t('Description: @desc', array('@desc' => $description)));
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function orderEditDetails(UcOrderInterface $order) {
+    $form['pm_other_description'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Description'),
+      '#default_value' => isset($order->payment_details['description']) ? $order->payment_details['description'] : '',
+      '#size' => 32,
+      '#maxlength' => 64,
+    );
+    return $form;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function orderLoad(UcOrderInterface $order) {
+    $description = db_query('SELECT description FROM {uc_payment_other} WHERE order_id = :id', array(':id' => $order->id()))->fetchField();
+    if (isset($description)) {
+      $order->payment_details['description'] = $description;
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function orderSave(UcOrderInterface $order) {
+    if (empty($order->payment_details['pm_other_description'])) {
+      db_delete('uc_payment_other')
+        ->condition('order_id', $order->id())
+        ->execute();
+    }
+    else {
+      db_merge('uc_payment_other')
+        ->key(array(
+          'order_id' => $order->id(),
+        ))
+        ->fields(array(
+          'description' => $order->payment_details['pm_other_description'],
+        ))
+        ->execute();
+    }
+  }
+
+}
diff --git a/payment/uc_payment_pack/lib/Drupal/uc_payment_pack/Tests/PaymentPackTest.php b/payment/uc_payment_pack/lib/Drupal/uc_payment_pack/Tests/PaymentPackTest.php
new file mode 100644
index 0000000..ed8d23b
--- /dev/null
+++ b/payment/uc_payment_pack/lib/Drupal/uc_payment_pack/Tests/PaymentPackTest.php
@@ -0,0 +1,92 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\uc_payment_pack\Tests\PaymentPackTest.
+ */
+
+namespace Drupal\uc_payment_pack\Tests;
+
+use Drupal\uc_store\Tests\UbercartTestBase;
+
+/**
+ * Payment method pack tests.
+ */
+class PaymentPackTest extends UbercartTestBase {
+
+  public static $modules = array('uc_payment', 'uc_payment_pack');
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Payment method pack',
+      'description' => 'Ensures that the payment pack methods function correctly.',
+      'group' => 'Ubercart',
+    );
+  }
+
+  public function setUp() {
+    parent::setUp();
+
+    // Log in and add a product to the cart for testing.
+    $this->drupalLogin($this->adminUser);
+    $this->addToCart($this->product);
+
+    // Disable address panes during checkout.
+    variable_set('uc_pane_delivery_enabled', FALSE);
+    variable_set('uc_pane_billing_enabled', FALSE);
+  }
+
+  public function testCheck() {
+    $this->drupalGet('admin/store/settings/payment');
+    $this->assertText('Check', 'Check payment method found.');
+    $this->assertFieldByName('methods[check][status]', 1, 'Check payment method is enabled by default.');
+
+    $this->drupalGet('admin/store/settings/payment/method/check');
+    $this->assertTitle('Check settings | Drupal');
+    // @todo: Fix and test the settings page
+
+    $this->drupalGet('cart/checkout');
+    $this->assertFieldByName('panes[payment][payment_method]', 'check', 'Check payment method is selected at checkout.');
+    $this->assertText('Checks should be made out to:');
+    // @todo: Test the settings
+    // $this->assertText('Personal and business checks will be held for up to 10 business days to ensure payment clears before an order is shipped.');
+
+    $this->drupalPostForm(NULL, array(), 'Review order');
+    $this->assertText('Check', 'Check payment method found on review page.');
+    $this->assertText('Mail to', 'Check payment method help text found on review page.');
+    // @todo: Test the settings
+
+    $this->drupalPostForm(NULL, array(), 'Submit order');
+
+    $order = entity_load('uc_order', 1);
+    $this->assertEqual($order->getPaymentMethodId(), 'check', 'Order has check payment method.');
+
+    $this->drupalGet('user/' . $order->getUserId() . '/orders/' . $order->id());
+    $this->assertText('Method: Check', 'Check payment method displayed.');
+
+    $this->drupalGet('admin/store/orders/' . $order->id());
+    $this->assertText('Method: Check', 'Check payment method displayed.');
+    $this->assertLink('Receive Check');
+
+    $this->clickLink('Receive Check');
+    $this->assertFieldByName('amount', number_format($order->getTotal(), 2, '.', ''), 'Amount field defaults to order total.');
+
+    $edit = array(
+      'comment' => $this->randomString(),
+      'clear_month' => mt_rand(1, 12),
+      'clear_day' => mt_rand(1, 28),
+      'clear_year' => date('Y') + mt_rand(0, 1),
+    );
+    $formatted = sprintf('%02d-%02d-%d', $edit['clear_month'], $edit['clear_day'], $edit['clear_year']);
+    $this->drupalPostForm(NULL, $edit, 'Receive check');
+
+    $this->assertNoLink('Receive Check');
+    $this->assertText('Clear Date: ' . $formatted, 'Check clear date found.');
+
+    $this->drupalGet('user/' . $order->getUserId() . '/orders/' . $order->id());
+    $this->assertText('Check received');
+    $this->assertText('Expected clear date:');
+    $this->assertText($formatted, 'Check clear date found.');
+  }
+
+}
diff --git a/payment/uc_payment_pack/uc_payment_pack.module b/payment/uc_payment_pack/uc_payment_pack.module
index 747eb41..b3d9bbc 100644
--- a/payment/uc_payment_pack/uc_payment_pack.module
+++ b/payment/uc_payment_pack/uc_payment_pack.module
@@ -1,378 +1 @@
 <?php
-
-/**
- * @file
- * Provides the Check/Money Order, COD, and "Other" payment methods.
- */
-
-
-/**
- * Implements hook_menu().
- */
-function uc_payment_pack_menu() {
-  $items['admin/store/orders/%uc_order/receive_check'] = array(
-    'title' => 'Receive check',
-    'description' => 'Record details of a check that has been received.',
-    'route_name' => 'uc_payment_pack.check.receive',
-  );
-
-  return $items;
-}
-
-/**
- * Implements hook_uc_payment_method().
- */
-function uc_payment_pack_uc_payment_method() {
-  $methods['check'] = array(
-    'name'       => t('Check', array(), array('context' => 'cheque')),
-    'title'      => t('Check or money order'),
-    'desc'       => t('Pay by mailing a check or money order.'),
-    'callback'   => 'uc_payment_method_check',
-    'weight'     => 1,
-    'checkout'   => TRUE,
-    'no_gateway' => TRUE,
-  );
-  $methods['cod'] = array(
-    'name'       => t('COD'),
-    'title'      => t('Cash on delivery'),
-    'desc'       => t('Pay cash on delivery on pick-up.'),
-    'callback'   => 'uc_payment_method_cod',
-    'weight'     => 1,
-    'checkout'   => FALSE,
-    'no_gateway' => TRUE,
-  );
-  $methods['other'] = array(
-    'name'       => t('Other'),
-    'title'      => t('Other'),
-    'desc'       => t('A generic payment method type.'),
-    'callback'   => 'uc_payment_method_other',
-    'weight'     => 10,
-    'checkout'   => FALSE,
-    'no_gateway' => TRUE,
-  );
-
-  return $methods;
-}
-
-/**
- * Payment method callback for the generic payment method "Other".
- */
-function uc_payment_method_other($op, &$order) {
-  switch ($op) {
-    case 'order-view':
-    case 'customer-view':
-      // Fetch the description for the payment entered by the administrator.
-      if ($description = db_query('SELECT description FROM {uc_payment_other} WHERE order_id = :id', array(':id' => $order->id()))->fetchField()) {
-        return array('#markup' => t('Description: @desc', array('@desc' => $description)));
-      }
-      break;
-
-    case 'order-details':
-      $form['pm_other_description'] = array(
-        '#type' => 'textfield',
-        '#title' => t('Description'),
-        '#default_value' => isset($order->payment_details['description']) ? $order->payment_details['description'] : '',
-        '#size' => 32,
-        '#maxlength' => 64,
-      );
-      return $form;
-
-    case 'order-load':
-      $description = db_query('SELECT description FROM {uc_payment_other} WHERE order_id = :id', array(':id' => $order->id()))->fetchField();
-      if (isset($description)) {
-        $order->payment_details['description'] = $description;
-      }
-      break;
-
-    case 'order-save':
-      if (empty($order->payment_details['pm_other_description'])) {
-        db_delete('uc_payment_other')
-          ->condition('order_id', $order->id())
-          ->execute();
-      }
-      else {
-        db_merge('uc_payment_other')
-          ->key(array(
-            'order_id' => $order->id(),
-          ))
-          ->fields(array(
-            'description' => $order->payment_details['pm_other_description'],
-          ))
-          ->execute();
-      }
-      break;
-  }
-}
-
-/**
- * Payment method callback for the "Cash on Delivery" payment method.
- */
-function uc_payment_method_cod($op, &$order, $form = NULL, $form_state = NULL) {
-  $cod_config = \Drupal::config('uc_cod.settings');
-  switch ($op) {
-    case 'cart-details':
-      $build['policy'] = array(
-        '#markup' => '<p>' . $cod_config->get('policy') . '</p>'
-      );
-
-      if (($max = $cod_config->get('max_order')) > 0 && is_numeric($max)) {
-        $build['eligibility'] = array(
-          '#markup' => '<p>' . t('Orders totalling more than !number are <b>not eligible</b> for COD.', array('!number' => uc_currency_format($max))) . '</p>'
-        );
-      }
-
-      if ($cod_config->get('delivery_date')) {
-        $build += uc_payment_method_cod_form(array(), $form_state, $order);
-      }
-      return $build;
-
-    case 'cart-process':
-      if ($cod_config->get('delivery_date')) {
-        $order->payment_details = $form_state['values']['panes']['payment']['details'];
-      }
-      return TRUE;
-
-    case 'cart-review':
-      $review = array();
-      if ($cod_config->get('delivery_date')) {
-        $date = uc_date_format(
-          $order->payment_details['delivery_month'],
-          $order->payment_details['delivery_day'],
-          $order->payment_details['delivery_year']
-        );
-        $review[] = array('title' => t('Delivery date'), 'data' => $date);
-      }
-      return $review;
-
-    case 'order-view':
-    case 'customer-view':
-      $build = array('#markup' => '');
-      if ($cod_config->get('delivery_date') &&
-          isset($order->payment_details['delivery_month']) &&
-          isset($order->payment_details['delivery_day']) &&
-          isset($order->payment_details['delivery_year'])) {
-        $build['#markup'] = t('Desired delivery date:') . '<br />' .
-          uc_date_format(
-            $order->payment_details['delivery_month'],
-            $order->payment_details['delivery_day'],
-            $order->payment_details['delivery_year']
-          );
-      }
-      return $build;
-
-    case 'order-details':
-      $build = array();
-      if ($cod_config->get('delivery_date')) {
-        $build = uc_payment_method_cod_form(array(), $form_state, $order);
-      }
-      return $build;
-
-    case 'order-load':
-      $result = db_query('SELECT * FROM {uc_payment_cod} WHERE order_id = :id', array(':id' => $order->id()));
-      if ($row = $result->fetchObject()) {
-        $order->payment_details = array(
-          'delivery_month' => $row->delivery_month,
-          'delivery_day'   => $row->delivery_day,
-          'delivery_year'  => $row->delivery_year,
-        );
-      }
-      break;
-
-    case 'order-submit':
-      if ($order->getPaymentMethodId() == 'cod' &&
-          ($max = $cod_config->get('max_order')) > 0 &&
-          is_numeric($max) &&
-          $order->getTotal() > $max) {
-        $result[] = array(
-          'pass' => FALSE,
-          'message' => t('Your final order total exceeds the maximum for COD payment.  Please go back and select a different method of payment.')
-        );
-        return $result;
-      }
-      // TODO: This falls through to the order-save case - is this deliberate?
-      // If so, it should be documented.
-
-    case 'order-save':
-      if (isset($order->payment_details['delivery_month']) &&
-          isset($order->payment_details['delivery_day'])   &&
-          isset($order->payment_details['delivery_year'])    ) {
-        db_merge('uc_payment_cod')
-          ->key(array('order_id' => $order->id()))
-          ->fields(array(
-            'delivery_month' => $order->payment_details['delivery_month'],
-            'delivery_day'   => $order->payment_details['delivery_day'],
-            'delivery_year'  => $order->payment_details['delivery_year'],
-          ))
-          ->execute();
-      }
-      break;
-
-    case 'order-delete':
-      db_delete('uc_payment_cod')
-        ->condition('order_id', $order->id())
-        ->execute();
-      break;
-
-    case 'settings':
-      $form['uc_cod_policy'] = array(
-        '#type' => 'textarea',
-        '#title' => t('Policy message'),
-        '#default_value' => $cod_config->get('policy'),
-        '#description' => t('Help message shown at checkout.'),
-      );
-      $form['uc_cod_max_order'] = array(
-        '#type' => 'textfield',
-        '#title' => t('Maximum order total eligible for COD'),
-        '#default_value' => $cod_config->get('max_order'),
-        '#description' => t('Set to 0 for no maximum order limit.'),
-      );
-      $form['uc_cod_delivery_date'] = array(
-        '#type' => 'checkbox',
-        '#title' => t('Let customers enter a desired delivery date.'),
-        '#default_value' => $cod_config->get('delivery_date'),
-      );
-      return $form;
-  }
-}
-
-/**
- * Collect additional information for the "Cash on Delivery" payment method.
- *
- * @ingroup forms
- */
-function uc_payment_method_cod_form($form, &$form_state, $order) {
-  $month = !empty($order->payment_details['delivery_month']) ? $order->payment_details['delivery_month'] : format_date(REQUEST_TIME, 'custom', 'n');
-  $day   = !empty($order->payment_details['delivery_day'])   ? $order->payment_details['delivery_day']   : format_date(REQUEST_TIME, 'custom', 'j');
-  $year  = !empty($order->payment_details['delivery_year'])  ? $order->payment_details['delivery_year']  : format_date(REQUEST_TIME, 'custom', 'Y');
-
-  $form['description'] = array(
-    '#markup' => '<div>' . t('Enter a desired delivery date:') . '</div>',
-  );
-  $form['delivery_month'] = uc_select_month(NULL, $month);
-  $form['delivery_day']   = uc_select_day(NULL, $day);
-  $form['delivery_year']  = uc_select_year(NULL, $year, format_date(REQUEST_TIME, 'custom', 'Y'), format_date(REQUEST_TIME, 'custom', 'Y') + 1);
-
-  return $form;
-}
-
-/**
- * Payment method callback for the "Check" payment method.
- */
-function uc_payment_method_check($op, &$order, $form = NULL, &$form_state = NULL) {
-  $check_config = \Drupal::config('uc_check.settings');
-  switch ($op) {
-    case 'cart-details':
-      $build['instructions'] = array(
-        '#markup' => t('Checks should be made out to:')
-      );
-
-      if (!$check_config->get('mailing_street1')) {
-        $build['address'] = array(
-          '#markup' => uc_store_address(),
-          '#prefix' => '<p>',
-          '#suffix' => '</p>',
-        );
-      }
-      else {
-        $build['address'] = array(
-          '#markup' => uc_address_format(
-            $check_config->get('mailing_name'),
-            NULL,
-            $check_config->get('mailing_company'),
-            $check_config->get('mailing_street1'),
-            $check_config->get('mailing_street2'),
-            $check_config->get('mailing_city'),
-            $check_config->get('mailing_zone'),
-            $check_config->get('mailing_postal_code'),
-            $check_config->get('mailing_country')
-          ),
-          '#prefix' => '<p>',
-          '#suffix' => '</p>',
-        );
-      }
-
-      $build['policy'] = array(
-        '#markup' => '<p>' . $check_config->get('policy') . '</p>'
-      );
-      return $build;
-
-    case 'cart-review':
-      if (!$check_config->get('mailing_street1')) {
-        $review[] = array(
-          'title' => t('Mail to'),
-          'data' => uc_store_address(),
-        );
-      }
-      else {
-        $review[] = array(
-          'title' => t('Mail to'),
-          'data' => uc_address_format(
-            $check_config->get('mailing_name'),
-            NULL,
-            $check_config->get('mailing_company'),
-            $check_config->get('mailing_street1'),
-            $check_config->get('mailing_street2'),
-            $check_config->get('mailing_city'),
-            $check_config->get('mailing_zone'),
-            $check_config->get('mailing_postal_code'),
-            $check_config->get('mailing_country')
-          )
-        );
-      }
-      return $review;
-
-    case 'order-view':
-      $build = array('#suffix' => '<br />');
-
-      $result = db_query('SELECT clear_date FROM {uc_payment_check} WHERE order_id = :id ', array(':id' => $order->id()));
-      if ($clear_date = $result->fetchField()) {
-        $build['#markup'] = t('Clear Date:') . ' ' . format_date($clear_date, 'uc_store');
-      }
-      else {
-        $build['#markup'] = l(t('Receive Check'), 'admin/store/orders/' . $order->id() . '/receive_check');
-      }
-      return $build;
-
-    case 'customer-view':
-      $build = array();
-      $result = db_query('SELECT clear_date FROM {uc_payment_check} WHERE order_id = :id ', array(':id' => $order->id()));
-      if ($clear_date = $result->fetchField()) {
-        $build['#markup'] = t('Check received') . '<br />' .
-          t('Expected clear date:') . '<br />' . format_date($clear_date, 'uc_store');
-      }
-      return $build;
-
-    case 'settings':
-      $form['check_address_info'] = array(
-        '#markup' => '<div>' . t('Set the mailing address to display to customers who choose this payment method during checkout.') . '</div>',
-      );
-      $form['uc_check_mailing_name'] = array(
-        '#type' => 'textfield',
-        '#title' => t('Contact'),
-        '#description' => t('Direct checks to a person or department.'),
-        '#default_value' => $check_config->get('mailing_name'),
-      );
-      $form['uc_check_address'] = array(
-        '#type' => 'uc_address',
-        '#default_value' => array(
-          'uc_check_mailing_company' => $check_config->get('mailing_company'),
-          'uc_check_mailing_street1' => $check_config->get('mailing_street1'),
-          'uc_check_mailing_street2' => $check_config->get('mailing_street2'),
-          'uc_check_mailing_city' => $check_config->get('mailing_city'),
-          'uc_check_mailing_zone' => $check_config->get('mailing_zone'),
-          'uc_check_mailing_country' => isset($form_state['values']['uc_check_mailing_country']) ? $form_state['values']['uc_check_mailing_country'] : $check_config->get('uc_check_mailing_country'),
-          'uc_check_mailing_postal_code' => $check_config->get('mailing_postal_code'),
-        ),
-        '#required' => FALSE,
-        '#key_prefix' => 'uc_check_mailing',
-      );
-      $form['uc_check_policy'] = array(
-        '#type' => 'textarea',
-        '#title' => t('Check payment policy', array(), array('context' => 'cheque')),
-        '#description' => t('Instructions for customers on the checkout page.'),
-        '#default_value' => $check_config->get('policy'),
-        '#rows' => 3,
-      );
-      return $form;
-  }
-}
diff --git a/payment/uc_payment_pack/uc_payment_pack.routing.yml b/payment/uc_payment_pack/uc_payment_pack.routing.yml
index c4286c4..46c6aed 100644
--- a/payment/uc_payment_pack/uc_payment_pack.routing.yml
+++ b/payment/uc_payment_pack/uc_payment_pack.routing.yml
@@ -4,3 +4,7 @@ uc_payment_pack.check.receive:
     _form: '\Drupal\uc_payment_pack\Form\ReceiveCheckForm'
   requirements:
     _permission: 'view all orders'
+  options:
+    parameters:
+      order:
+        type: 'entity:uc_order'
