--- payment/uc_paypal/uc_paypal.module.orig	2010-05-20 16:33:01.000000000 -0400
+++ payment/uc_paypal/uc_paypal.module	2010-06-01 23:27:12.000000000 -0400
@@ -976,6 +976,20 @@ function uc_paypal_wps_form($form_state,
         }
       }
     }
+
+    // Apply discounts (negative amount line items). For example, this handles line items created by uc_coupon.
+    $discount = 0;
+
+    foreach ($order->line_items as $item) {
+      if ($item['amount'] < 0) {
+        // The minus sign is not an error! The discount amount must be positive.
+        $discount -= $item['amount'];
+      }
+    }
+
+    if ($discount != 0) {
+      $data['discount_amount_cart'] = $discount;
+    }
   }
   else {
     // List the whole cart as a single item to account for fees/discounts
