Index: modules/uc_saferpay/uc_saferpay.module
===================================================================
--- modules/uc_saferpay/uc_saferpay.module	(revision 15)
+++ modules/uc_saferpay/uc_saferpay.module	(working copy)
@@ -164,22 +164,28 @@
  * Implementation of hook_form_alter().
  */
 function uc_saferpay_form_alter(&$form, &$form_state, $form_id) {
-  if ($form_id == 'uc_cart_checkout_review_form' && ($order_id = intval($_SESSION['cart_order'])) > 0) {
-    global $language;
+  if ($form_id == 'uc_cart_checkout_review_form') {
+    $form['#submit'][] = 'uc_saferpay_pay';
+  }
+}
+
+function uc_saferpay_pay(&$form, &$form_state) {
+  if (($order_id = intval($_SESSION['cart_order'])) > 0) {
     $order = uc_order_load($order_id);
-
+    
     if ($order->payment_method == 'saferpay') {
-        $url = _uc_saferpay_initpay($order);
-        if (drupal_strlen($url) > 0) {
-          if ( strpos('\\', $url) !== FALSE ) {
-            $url = stripslashes($url);
-          }
-          $form['#action'] = $url;
-          $form['#attributes']['onsubmit'] = 'window.open(\'' . $url . '\', \'SaferpayTerminal\', \'width=650,height=500\'); return false;';
+      $url = _uc_saferpay_initpay($order);
+      if (drupal_strlen($url) > 0) {
+        if ( strpos('\\', $url) !== FALSE ) {
+          $url = stripslashes($url);
         }
+        
+        drupal_goto($url);
+      }
     }
   }
 }
+
 /**
  * Interacts with the saferpay webservice to get the url to make the transaction.
  *
