diff -rupN uc_ogone_org//uc_ogone_payment.module uc_ogone//uc_ogone_payment.module
--- uc_ogone_org//uc_ogone_payment.module	2011-04-29 21:34:11.000000000 +0200
+++ uc_ogone//uc_ogone_payment.module	2011-10-31 11:55:29.664286908 +0100
@@ -43,6 +43,14 @@ function uc_ogone_payment_menu() {
       'access arguments' => array('access content'),
       'type' => MENU_CALLBACK,
     );
+// WJR
+    $items['cart/ogone_ok'] = array(
+      'title' => 'Ogone Payment OK',
+      'page callback' => 'uc_ogone_ok',
+      'access arguments' => array('access content'),
+      'type' => MENU_CALLBACK,
+    );
+// WJR END
 
     $items['cart/ogone_return_ok'] = array(
       'title' => 'Ogone Payment return status',
@@ -456,6 +464,13 @@ function uc_ogone_redirect_form() {
   }
 }
 
+// WJR
+function uc_ogone_ok() {
+    $_SESSION['do_complete'] = TRUE;
+	drupal_goto('cart/checkout/complete');
+}
+// WJR END
+
 /**
  * This is called by Ogone itself NOT within the user session!
  */
@@ -517,7 +532,7 @@ function uc_ogone_return_ok($auto = FALS
     );
     // Duplicates happen, check if we have one.
     if (db_result(db_query_range("SELECT 1 FROM {uc_payment_ogone} WHERE pay_id = %d", $payment->pay_id, 0, 1))) {
-      watchdog('uc_ogone_payment', 'Duplicate Ogone Pay ID @pay_id recieved.', array('@pay_id' => $payment->pay_id));
+      watchdog('uc_ogone_payment', 'Duplicate Ogone Pay ID @pay_id received.', array('@pay_id' => $payment->pay_id));
       // TODO The drupal_goto('cart/checkout/complete') below will redo some
       // order operations, like sending invoices. However, the logic for
       // messages and redirects in uc_cart_checkout_complete() and
@@ -527,15 +542,24 @@ function uc_ogone_return_ok($auto = FALS
     }
     else {
       drupal_write_record('uc_payment_ogone', $payment);
+	}
       uc_order_update_status($payment->order_id, uc_order_state_default('payment_received'));
-    }
+
+	    $order = uc_order_load($payment->order_id);
+		uc_payment_enter($order->order_id, 'ogone_payment', $order->order_total, $order->uid, NULL, $comment);
+// WJR
+//    }
 
     // This lets us know it's a legitimate access of the complete page.
     $_SESSION['cart_order'] = $payment->order_id;
-    $_SESSION['do_complete'] = TRUE;
+//    $_SESSION['do_complete'] = TRUE;
 
     if (!$auto) {
-      drupal_goto('cart/checkout/complete');
+// WJR 
+// for some reason we have to do this by going through another local function first
+// i.e. ogone_ok, to restore the session
+//      drupal_goto('cart/checkout/complete');
+      drupal_goto('cart/ogone_ok');
     }
   }
   else {
