diff --git a/payment_ubercart.module b/payment_ubercart.module
index a3d15c0..fcb8dc3 100644
--- a/payment_ubercart.module
+++ b/payment_ubercart.module
@@ -70,10 +70,25 @@ function payment_ubercart_uc_payment_method() {
 function payment_ubercart_payment_line_item_info() {
   return array(
     new PaymentLineItemInfo(array(
-      'callback' => 'payment_ubercart_payment_line_item_get',
-      'name' => 'payment_ubercart',
+      'callback' => 'payment_line_item_get_prefixed',
+      'name' => 'payment_ubercart_product',
       'title' => t('Ubercart products'),
     )),
+    new PaymentLineItemInfo(array(
+      'callback' => 'payment_line_item_get_prefixed',
+      'name' => 'payment_ubercart_order_balance',
+      'title' => t('Ubercart order balance'),
+    )),
+    new PaymentLineItemInfo(array(
+      'callback' => 'payment_line_item_get_prefixed',
+      'name' => 'payment_ubercart_line_item',
+      'title' => t('Ubercart order line items'),
+    )),
+    new PaymentLineItemInfo(array(
+      'callback' => 'payment_line_item_get_prefixed',
+      'name' => 'payment_ubercart_hook_uc_order_total',
+      'title' => t('Ubercart hook_uc_order() total'),
+    )),
   );
 }
 
@@ -133,12 +148,57 @@ function payment_ubercart_callback($op, &$order, array $form = NULL, array &$for
       'payment_ubercart_uc_order_id' => $order->order_id,
       'pid' => $pid,
     ));
-    foreach ($order->products as $product) {
+
+    // Add orders, line items, and hook_uc_order() totals to the payment as line items.
+    $order->order_total = uc_order_get_total($order);
+    $balance = uc_payment_balance($order);
+    if ($order->order_total == $balance) {
+      foreach ($order->products as $product) {
+        $payment->setLineItem(new PaymentLineItem(array(
+          'amount' => $product->price,
+          'description' => $product->title,
+          'quantity' => $product->qty,
+          'name' => 'payment_ubercart_product_' . $product->nid,
+        )));
+      }
+      if (is_array($order->line_items)) {
+        foreach ($order->line_items as $line_item) {
+          if (_uc_line_item_data($line_item['type'], 'calculated') == TRUE) {
+            $payment->setLineItem(new PaymentLineItem(array(
+              'amount' => $line_item['amount'],
+              'description' => $line_item['title'],
+              'quantity' => 1,
+              'name' => 'payment_ubercart_line_item_' . $line_item['line_item_id'],
+            )));
+          }
+        }
+      }
+      $hook_order_total = 0;
+      foreach (module_implements('uc_order') as $module) {
+        $function = $module . '_uc_order';
+        // $order must be passed by reference.
+        if ($value = $function('total', $order, NULL) && is_numeric($value)) {
+          $hook_order_total += $value;
+        }
+      }
+      if ($hook_order_total) {
+        $payment->setLineItem(new PaymentLineItem(array(
+          'amount' => $hook_order_total,
+          'description' => 'Other',
+          'quantity' => 1,
+          'name' => 'payment_ubercart_hook_uc_order_total_' , $order->order_id,
+        )));
+      }
+    }
+    else {
       $payment->setLineItem(new PaymentLineItem(array(
-        'amount' => $product->price,
-        'description' => $product->title,
-        'quantity' => $product->qty,
-        'name' => 'payment_ubercart_' . $product->nid,
+        'amount' => $balance,
+        'description' => 'Order !order_id',
+        'description_arguments' => array(
+          '!order_id' => $order->order_id,
+        ),
+        'quantity' => 1,
+        'name' => 'payment_ubercart_order_balance_' , $order->order_id,
       )));
     }
 
@@ -264,21 +324,6 @@ function payment_ubercart_pids_load($order_id) {
 }
 
 /**
- * Implements PaymentLineItemInfo::callback.
- */
-function payment_ubercart_payment_line_item_get($name, Payment $payment) {
-  $selection = array();
-
-  foreach ($payment->line_items as $line_item) {
-    if (substr($line_item->name, 0, 17) == 'payment_ubercart_') {
-      $selection[] = $line_item;
-    }
-  }
-
-  return $selection;
-}
-
-/**
  * Implements form build callback for the configuration form.
  */
 function payment_ubercart_form_configuration(array $form, array &$form_state) {
