Index: payment/uc_payment/uc_payment.ca.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/payment/uc_payment/Attic/uc_payment.ca.inc,v
retrieving revision 1.1.2.9
diff -u -p -r1.1.2.9 uc_payment.ca.inc
--- payment/uc_payment/uc_payment.ca.inc	17 Aug 2009 21:27:55 -0000	1.1.2.9
+++ payment/uc_payment/uc_payment.ca.inc	17 Feb 2011 11:39:11 -0000
@@ -67,11 +67,11 @@ function uc_payment_ca_predicate() {
     ),
   );
 
-  // Set the order status to "Completed" when checkout is complete, none
+  // Set the order status to "Completed" when a payment is received, none
   // of the products are shippable, and the balance is less than or equal to 0.
-  $predicates['uc_checkout_complete_paid'] = array(
-    '#title' => t('Update order status upon checkout completion with full payment'),
-    '#trigger' => 'uc_checkout_complete',
+  $predicates['uc_payment_received_non_shippable'] = array(
+    '#title' => t('Update order status on non-shippable orders to completed'),
+    '#trigger' => 'uc_payment_entered',
     '#class' => 'payment',
     '#status' => 1,
     '#weight' => 1,
@@ -99,6 +99,17 @@ function uc_payment_ca_predicate() {
             'negate' => TRUE,
           ),
         ),
+        array(
+          '#name' => 'uc_order_status_condition',
+          '#title' => t('If the order status is not already Completed.'),
+          '#argument_map' => array(
+            'order' => 'order',
+          ),
+          '#settings' => array(
+            'negate' => TRUE,
+            'order_status' => 'completed',
+          ),
+        ),
       ),
     ),
     '#actions' => array(
Index: payment/uc_paypal/uc_paypal.pages.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/payment/uc_paypal/uc_paypal.pages.inc,v
retrieving revision 1.1.2.16
diff -u -p -r1.1.2.16 uc_paypal.pages.inc
--- payment/uc_paypal/uc_paypal.pages.inc	11 Oct 2010 01:27:16 -0000	1.1.2.16
+++ payment/uc_paypal/uc_paypal.pages.inc	17 Feb 2011 11:39:11 -0000
@@ -112,9 +112,9 @@ function uc_paypal_ipn() {
         if ($payment_amount != $order->order_total) {
           watchdog('uc_paypal', 'Payment @txn_id for order @order_id did not equal the order total.', array('@txn_id' => $txn_id, '@order_id' => $order->order_id), WATCHDOG_WARNING, l(t('view'), 'admin/store/orders/'. $order->order_id));
         }
+        uc_cart_complete_sale($order);
         $comment = t('PayPal transaction ID: @txn_id', array('@txn_id' => $txn_id));
         uc_payment_enter($order_id, 'paypal_wps', $payment_amount, $order->uid, NULL, $comment);
-        uc_cart_complete_sale($order);
         uc_order_comment_save($order_id, 0, t('Payment of @amount @currency submitted through PayPal.', array('@amount' => uc_price($payment_amount, $context, $options), '@currency' => $payment_currency)), 'order', 'payment_received');
         uc_order_comment_save($order_id, 0, t('PayPal IPN reported a payment of @amount @currency.', array('@amount' => uc_price($payment_amount, $context, $options), '@currency' => $payment_currency)));
         break;
Index: uc_cart/uc_cart.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/uc_cart/uc_cart.module,v
retrieving revision 1.15.2.47
diff -u -p -r1.15.2.47 uc_cart.module
--- uc_cart/uc_cart.module	16 Feb 2011 03:07:51 -0000	1.15.2.47
+++ uc_cart/uc_cart.module	17 Feb 2011 11:39:11 -0000
@@ -1270,10 +1270,7 @@ function uc_cart_complete_sale($order, $
   // Move an order's status from "In Checkout" to "Pending"
   $status = db_result(db_query("SELECT order_status FROM {uc_orders} WHERE order_id = %d", $order->order_id));
   if (uc_order_status_data($status, 'state') == 'in_checkout') {
-    $status = uc_order_state_default('post_checkout');
-    if (uc_order_update_status($order->order_id, $status)) {
-      $order->order_status = $status;
-    }
+    uc_order_update_status($order->order_id, uc_order_state_default('post_checkout'));
   }
 
   // Empty that cart...
@@ -1282,8 +1279,11 @@ function uc_cart_complete_sale($order, $
   // Clear our the session variables used to force the cart workflow.
   unset($_SESSION['cart_order'], $_SESSION['do_complete'], $_SESSION['new_user']);
 
-  module_invoke_all('uc_checkout_complete', $order, $account);
-  ca_pull_trigger('uc_checkout_complete', $order, $account);
+  // Only pull the triggers if the order was in checkout when first loaded.
+  if (uc_order_status_data($order->order_status, 'state') == 'in_checkout') {
+    module_invoke_all('uc_checkout_complete', $order, $account);
+    ca_pull_trigger('uc_checkout_complete', $order, $account);
+  }
 
   return $themed_output;
 }
