diff --git modules/uc_recurring.uc_paypal.inc modules/uc_recurring.uc_paypal.inc
deleted file mode 100644
index 2908f65..0000000
--- modules/uc_recurring.uc_paypal.inc
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-// $Id:$
-
-/**
- * @file
- * Uc recurring implementation for the Paypal module.
- */
-
-/**
- * Implementation of hook_recurring_info().
- */
-function uc_recurring_uc_paypal_recurring_info() {
-  $items['paypal_wps'] = array(
-    'name' => t('Paypal website payments standard'),
-    'payment method' => 'paypal_wps',
-    'fee handler' => 'paypal_wps',
-    'module' => 'UC recurring',
-    'renew' => 'uc_recurring_paypal_wps_renew',
-    'process' => 'uc_recurring_paypal_wps_process',
-  );
-
-  $items['paypal_wpp'] = array(
-    'name' => t('PayPal website payments pro'),
-    'payment method' => 'paypal_wpp',
-    'fee handler' => 'paypal_wpp',
-    'module' => 'UC recurring',
-    'renew' => 'uc_recurring_paypal_wpp_renew',
-    'process' => 'uc_recurring_paypal_wpp_process',
-  );
-  return $items;
-}
-
-/**
- * Paypal website payments standard process.
- */
-function uc_recurring_paypal_wps_process($order, $fee) {
-  return TRUE;
-}
-
-/**
- * Paypal website payments standard renew.
- */
-function uc_recurring_paypal_wps_renew($order, $fee) {
-  return TRUE;
-}
-
-/**
- * PayPal website payments pro process.
- */
-function uc_recurring_paypal_wpp_process($order, $fee) {
-  return TRUE;
-}
-
-/**
- * PayPal website payments pro renew.
- */
-function uc_recurring_paypal_wpp_renew($order, $fee) {
-  return TRUE;
-}
-
-
diff --git modules/uc_recurring_paypal.info modules/uc_recurring_paypal.info
new file mode 100644
index 0000000..58c5ea0
--- /dev/null
+++ modules/uc_recurring_paypal.info
@@ -0,0 +1,8 @@
+; $Id:$
+name = Paypal Recurring Fees
+description = Handle paypal recurring fees.
+dependencies[] = uc_recurring
+dependencies[] = uc_paypal
+package = Ubercart - payment
+core = 6.x
+php = 5.0
diff --git modules/uc_recurring_paypal.module modules/uc_recurring_paypal.module
new file mode 100644
index 0000000..eec6171
--- /dev/null
+++ modules/uc_recurring_paypal.module
@@ -0,0 +1,321 @@
+<?php
+// $Id:$
+
+/**
+ * @file
+ * Uc recurring implementation for the Paypal module.
+ */
+
+/**
+ * Implementation of hook_recurring_info().
+ */
+function uc_recurring_paypal_menu() {
+  $items['uc_recurring_paypal/ipn/%'] = array( 
+    'title' => 'PayPal IPN',
+    'page callback' => 'uc_recurring_paypal_ipn',
+    'access callback' => 'uc_paypal_ipn_access',
+    'type' => MENU_CALLBACK,
+  );
+
+  // this menu item is a mock url for emulating the paypal IPN
+  $items['uc_recurring_mock_paypal/cgi-bin/webscr'] = array(
+    'title' => 'PayPal Website',
+    'page callback' => 'paypal_mock_web_page',
+    'access callback' => TRUE,
+    'type' => MENU_CALLBACK,
+  );
+  return $items;
+}
+
+function paypal_mock_web_page() {
+  echo 'VERIFIED';
+  exit();
+}
+
+/**
+ * Implementation of hook_recurring_info().
+ */
+function uc_recurring_paypal_recurring_info() {
+  $items['paypal_wps'] = array(
+    'name' => t('Paypal website payments standard'),
+    'payment method' => 'paypal_wps',
+    'fee handler' => 'paypal_wps',
+    'module' => 'uc_recurring_paypal',
+    'renew' => 'uc_recurring_paypal_wps_renew',
+    'process' => 'uc_recurring_paypal_wps_process',
+    'own_hander' => TRUE,
+  );
+/*
+  $items['paypal_wpp'] = array(
+    'name' => t('PayPal website payments pro'),
+    'payment method' => 'credit',
+    'fee handler' => 'paypal_wpp',
+    'module' => 'uc_recurring_paypal',
+    'renew' => 'uc_recurring_paypal_wpp_renew',
+    'process' => 'uc_recurring_paypal_wpp_process',
+    'own_hander' => TRUE,
+  );
+*/
+  return $items;
+}
+
+function uc_recurring_paypal_wps_process($order, &$fee) {
+  // the recurring payment is setup at the time of product purchase
+  $subscr_id = check_plain($_POST['subscr_id']);
+  if ($subscr_id) {
+    $fee->data['subscr_id'] = $subscr_id;
+    return TRUE;
+  }
+  return FALSE;
+}
+
+function uc_recurring_paypal_wps_renew($order, &$fee) {
+  return TRUE;
+}
+
+/**
+ * Paypal website payments standard process
+ *
+ * Normally in a payment gateway we would just need to define the callback 'process':
+ * e.g. function uc_recurring_paypal_wps_process($order, $fee)
+ *
+ * But paypal_wps is implemented by altering the checkout review form to 
+ * change the form so it is submitted directly to paypal, we are using this
+ * same trick to alter the paypal form, its a messy hack but works for now.
+ */
+function uc_recurring_paypal_form_uc_paypal_wps_form_alter(&$form, $form_state) {
+  $order = $form['#parameters'][2];
+ 
+  // if recurring fees exist in the order
+  $recurring_fees = uc_recurring_get_recurring_products_in_order($order);
+
+  if (count($recurring_fees) > 0) {
+    // TODO: what do we do if someone tries to order more then one subscription??
+    // we will just process the first for now
+    $recurring_fee = $recurring_fees[0]; 
+    print_r($recurring_fee);
+    if (count($recurring_fees) > 1) {
+      drupal_set_message(t('Sorry recurring payments can only be setup for one product at a time when paying via paypal, only the first recurring payment will be setup when you click on Submit order.'), 'warning');
+    }
+
+    // IPN control notify URL
+    $data['notify_url'] = url('uc_recurring_paypal/ipn/'. $order->order_id, array('absolute' => TRUE));
+
+    $data['cmd'] = '_xclick-subscriptions';  
+    $data['item_name'] = t('Order @order_id at !store', array('@order_id' => $order->order_id, '!store' => variable_get('uc_store_name', url('<front>', array('absolute' => TRUE)))));
+    // first payment
+    list($p, $t) = explode(' ', $recurring_fee['recurring product']->initial_charge);
+    $data['a1'] = sprintf("%0.2f", $order->order_total);
+    $data['p1'] = $p;  
+    $data['t1'] = strtoupper($t[0]); 
+    // recurring payments
+    list($p, $t) = explode(' ', $recurring_fee['recurring product']->regular_interval);
+    $data['a3'] = sprintf("%0.2f", $recurring_fee['recurring product']->fee_amount);
+    $data['p3'] = $p;  
+    $data['t3'] = strtoupper($t[0]);
+    
+    $data['src'] = 1;
+    if ($recurring_fee['recurring product']->number_intervals > 0) {
+      $data['srt'] = $recurring_fee['recurring product']->number_intervals;
+    }
+    $data['sra'] = 1; // reattempt failed payments
+
+    foreach ($data as $name => $value) {
+      if (!empty($value)) {
+        $form[$name] = array('#type' => 'hidden', '#value' => $value);
+      }
+    }
+    print_r($form);
+  }
+}
+
+/**
+ * PayPal website payments pro process.
+ */
+function uc_recurring_paypal_wpp_process($order, $fee) {
+  return TRUE;
+}
+
+/**
+ * PayPal website payments pro renew.
+ */
+function uc_recurring_paypal_wpp_renew($order, $fee) {
+  return TRUE;
+}
+
+/**
+ *
+ */
+function uc_recurring_paypal_ipn($order_id) {
+  watchdog('uc_recurring_paypal', 'Receiving IPN at URL for order @order_id. @debug',
+    array('@order_id' => $order_id, '@debug' => variable_get('uc_paypal_wps_debug_ipn', FALSE) ? '<pre>'. print_r($_POST, TRUE) .'</pre>' : ''));
+
+  if (!isset($_POST['invoice'])) {
+    watchdog('uc_recurring_paypal', 'IPN attempted with invalid order ID.', array(), WATCHDOG_ERROR);
+    return;
+  }
+
+  if (($len = strpos($_POST['invoice'], '-')) > 0) {
+    $order_id = intval(substr($_POST['invoice'], 0, $len));
+  }
+  else {
+    $order_id = intval($_POST['invoice']);
+  }
+
+  $order = uc_order_load($order_id);
+
+  if ($order == FALSE) {
+    watchdog('uc_recurring_paypal', 'IPN attempted for non-existent order.', array(), WATCHDOG_ERROR);
+    return;
+  }
+
+  // Assign posted variables to local variables
+  $payment_status = check_plain($_POST['payment_status']);
+  $payment_amount = check_plain($_POST['mc_gross']);
+  $payment_currency = check_plain($_POST['mc_currency']);
+  $payment_fee = check_plain($_POST['mc_fee']);
+  $receiver_email = check_plain($_POST['receiver_email']);
+  $txn_id = check_plain($_POST['txn_id']);
+  $txn_type = check_plain($_POST['txn_type']);
+  $payer_email = check_plain($_POST['payer_email']);
+
+  $req = '';
+  // subscription
+  $subscr_id = check_plain($_POST['subscr_id']);
+
+  switch ($txn_type) {
+    case 'subscr_signup':
+      // first we need to setup the recurring fee, since paypal_wps overrides the submit order function we need to call uc_recurring_order submit function here
+      uc_recurring_order('submit', $order, NULL);
+      $txn_id = $subscr_id; // subscriptions do not have a txn_id, so we will record the subscr_id instead
+      break;
+    case 'subscr_payment':
+      if ($order->order_status == 'completed') {
+        // fetch fee from database
+        $fees = uc_recurring_get_fees($order);
+        if ($fee = $fees[0]) {
+          $order_id = uc_recurring_renew($fee);
+          $order = uc_order_load($order_id);
+        }
+      }
+      break;
+    case 'subscr_eot':
+    case 'subscr_cancel':
+      $fees = uc_recurring_get_fees($order);
+      if ($fee = $fees[0]) {
+        uc_recurring_fee_cancel($fee->rfid, $fee);
+      }
+      $txn_id = $subscr_id;
+      break;
+  }
+ 
+  if ($order == FALSE) {
+    watchdog('uc_recurring_paypal', 'IPN attempted for non-existent order.', array(), WATCHDOG_ERROR);
+    return;
+  }
+
+  foreach ($_POST as $key => $value) {
+    $value = urlencode(stripslashes($value));
+    $req .= $key .'='. $value .'&';
+  }
+
+  $req .= 'cmd=_notify-validate';
+
+  if (variable_get('uc_paypal_wpp_server', '') == 'https://api-3t.paypal.com/nvp') {
+    $host = 'https://www.paypal.com/cgi-bin/webscr';
+  }
+  else {
+    $host = variable_get('uc_paypal_wps_server', 'https://www.sandbox.paypal.com/cgi-bin/webscr');
+  }
+
+  $response = drupal_http_request($host, array(), 'POST', $req);
+
+  // TODO: Change this to property_exists when we have a PHP requirement >= 5.1.
+  if (array_key_exists('error', $response)) {
+    watchdog('uc_recurring_paypal', 'IPN failed with HTTP error @error, code @code.', array('@error' => $response->error, '@code' => $response->code), WATCHDOG_ERROR);
+    return;
+  }
+
+  if (strcmp($response->data, 'VERIFIED') == 0) {
+    watchdog('uc_recurring_paypal', 'IPN transaction verified.');
+
+    $duplicate = db_result(db_query("SELECT COUNT(*) FROM {uc_payment_paypal_ipn} WHERE txn_id = '%s' AND txn_type = '%s' AND status <> 'Pending'", $txn_id, $txn_type));
+    if ($duplicate > 0) {
+      if ($order->payment_method != 'credit') {
+        watchdog('uc_recurring_paypal', 'IPN transaction ID has been processed before.', array(), WATCHDOG_NOTICE);
+      }
+      return;
+    }
+
+    db_query("INSERT INTO {uc_payment_paypal_ipn} (order_id, txn_id, txn_type, mc_gross, status, receiver_email, payer_email, received) VALUES (%d, '%s', '%s', '%s', '%s', '%s', '%s', %d)",
+      $order_id, $txn_id, $txn_type, $payment_amount, $payment_status, $receiver_email, $payer_email, time());
+
+    $context = array(
+      'revision' => 'formatted-original',
+      'type' => 'amount',
+    );
+    $options = array(
+      'sign' => FALSE,
+    );
+
+    switch ($payment_status) {
+      case 'Canceled_Reversal':
+        uc_order_comment_save($order_id, 0, t('PayPal has cancelled the reversal and returned !amount !currency to your account.', array('!amount' => uc_price($payment_amount, $context, $options), '!currency' => $payment_currency)), 'admin');
+        break;
+
+      case 'Completed':
+        $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);
+        if ($txn_type == 'subscr_payment') {
+          // update the status which will invoke any hooks that respond to completed status
+          uc_order_update_status($order_id, 'completed');
+        }
+        else {
+          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;
+
+      case 'Denied':
+        uc_order_comment_save($order_id, 0, t("You have denied the customer's payment."), 'admin');
+        break;
+
+      case 'Expired':
+        uc_order_comment_save($order_id, 0, t('The authorization has failed and cannot be captured.'), 'admin');
+        break;
+
+      case 'Failed':
+        uc_order_comment_save($order_id, 0, t("The customer's attempted payment from a bank account failed."), 'admin');
+        break;
+
+      case 'Pending':
+        uc_order_update_status($order_id, 'paypal_pending');
+        uc_order_comment_save($order_id, 0, t('Payment is pending at PayPal: @reason', array('@reason' => _uc_paypal_pending_message(check_plain($_POST['pending_reason'])))), 'admin');
+        break;
+
+      // You, the merchant, refunded the payment.
+      case 'Refunded':
+        $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);
+        break;
+
+      case 'Reversed':
+        watchdog('uc_recurring_paypal', 'PayPal has reversed a payment!', array(), WATCHDOG_ERROR);
+        uc_order_comment_save($order_id, 0, t('Payment has been reversed by PayPal: @reason', array('@reason' => _uc_paypal_reversal_message(check_plain($_POST['reason_code'])))), 'admin');
+        break;
+
+      case 'Processed':
+        uc_order_comment_save($order_id, 0, t('A payment has been accepted.'), 'admin');
+        break;
+
+      case 'Voided':
+        uc_order_comment_save($order_id, 0, t('The authorization has been voided.'), 'admin');
+        break;
+    }
+  }
+  elseif (strcmp($response->data, 'INVALID') == 0) {
+    watchdog('uc_recurring_paypal', 'IPN transaction failed verification.', array(), WATCHDOG_ERROR);
+    uc_order_comment_save($order_id, 0, t('An IPN transaction failed verification for this order.'), 'admin');
+  }
+}
diff --git modules/uc_recurring_paypal.test modules/uc_recurring_paypal.test
new file mode 100644
index 0000000..75603f6
--- /dev/null
+++ modules/uc_recurring_paypal.test
@@ -0,0 +1,190 @@
+<?php
+// $Id:$
+
+/**
+ * @file
+ * UC Recurring Paypal simpletest
+ */
+
+/**
+ * Test payment gateway api fuctions in uc_recurring
+ */
+class ucRecurringPaypalWPSTestCase extends ucRecurringTestCase {
+  public static function getInfo() {
+    return array(
+      'name' => t('Recurring - Paypal WPS'),
+      'description' => t('Test the paypal IPN callback on recurring orders'),
+      'group' => t('Ubercart'),
+    );
+  }
+
+  function setUp() {
+    parent::setUp('uc_recurring', 'uc_payment', 'uc_paypal', 'uc_recurring_paypal');
+
+    $this->createUsers();
+  }
+
+  /**
+   * place an order with the mock gateway payment module
+   */
+  function testRecurringPaypal() {
+    $this->drupalLogin($this->user_recurring_admin);
+
+    $settings = array('uc_payment_method_paypal_wps_checkout' => TRUE, 'uc_paypal_wps_email' => 'paypal@example.com');
+    $this->drupalPost('admin/store/settings/payment/edit/methods', $settings, t('Save configuration'));
+
+    // select mock gateway for payments
+    $settings = array('uc_recurring_payment_methods[paypal_wps]' => TRUE);
+    $this->drupalPost('admin/store/settings/products/edit/features', $settings, t('Save configuration'));
+
+    // create products with recurring features
+    $product = $this->createProduct(array('sell_price' => 20.00));
+    $recurring_feature = $this->createRecurringFeature($product->nid, array('unlimited_intervals' => TRUE, 'fee_amount' => 50));
+    $this->drupalLogout();
+
+    variable_set('uc_paypal_wps_server', url('uc_recurring_mock_paypal/cgi-bin/webscr', array('absolute' => TRUE)));
+
+    $this->drupalPost('node/'.$product->nid, array(), t('Add to cart'));
+    $this->assertRaw($product->title, t('The product name has been displayed on the cart page.'));
+    $this->assertRaw('added to', t('The product name has been displayed on the cart page.'));
+    $this->checkout();
+    $order_id = $this->lastCreatedOrderId();
+
+    // the ipn is expecting all the variables to be in the $_POST variable
+    global $_POST;
+    $_POST = $this->_uc_recurring_paypal_messages('subscr_signup', $order_id);
+    uc_recurring_paypal_ipn($order_id);
+    $_POST = $this->_uc_recurring_paypal_messages('subscr_payment', $order_id, 20);
+    uc_recurring_paypal_ipn($order_id);
+    $new_order_id = $this->lastCreatedOrderId();
+    $order = uc_order_load($new_order_id);
+
+    $this->assertEqual($order->order_status, 'completed', t('Order @order_id completed', array('@order_id' => $new_order_id))); 
+    $this->assertEqual($order_id, $new_order_id, t('First payment correctly recorded against first order'));
+
+    // renew order
+    $_POST = $this->_uc_recurring_paypal_messages('subscr_payment', $order_id, 50);
+    uc_recurring_paypal_ipn($order_id);
+    $new_order_id = $this->lastCreatedOrderId();
+    $order = uc_order_load($new_order_id);
+    $this->assertEqual($order->order_status, 'completed', t('Order @order_id completed', array('@order_id' => $new_order_id))); 
+    $this->assertEqual($order_id+1, $new_order_id, t('New order created for renewal'));
+  }
+
+  /**
+   * mock return values from paypal
+   */
+  function _uc_recurring_paypal_messages($msg_type, $order_id, $amount = 0) { 
+    $subscr_id = 'S-36L13190CF840735L';
+    $lastname = 'lastname';
+    $firstname = 'firstname';
+    $payer_email = 'email@example.com';
+    $order_title = 'Order '. $order_id;
+    $site_email = 'site@example.com';
+    $messages = array(
+      'subscr_signup' => array(
+        'txn_type' => 'subscr_signup',
+        'subscr_id' => $subscr_id,
+        'last_name' => $lastname,
+        'residence_country' => 'AU',
+        'mc_currency' => 'USD',
+        'item_name' => $order_title,
+        'business' => $site_email,
+        'amount1' => '20.00',
+        'amount3' => '50.00',
+        'recurring' => '1',
+        'verify_sign' => 'AD64hcmiT1x99QnLF9FyFJZ8tiTHAkx9HelO6oUjwyK4tjmKRIrCWgjd',
+        'payer_status' => 'unverified',
+        'payer_email' => $payer_email,
+        'first_name' => $firstname,
+        'receiver_email' => $site_email,
+        'payer_id' => '76VZLCDJFJF34',
+        'invoice' => $order_id .'-QKO',
+        'reattempt' => '1',
+        'subscr_date' => '06:04:49 Aug 31, 2009 PDT',
+        'charset' => 'windows-1252',
+        'notify_version' => '2.8',
+        'period1' => '7 D',
+        'mc_amount1' => '20.00',
+        'period3' => '1 M',
+        'mc_amount3' => '50.00',
+      ),
+      'subscr_payment' => array(
+        'transaction_subject' => '',
+        'payment_date' => '04:23:25 Aug 30, 2009 PDT',
+        'txn_type' => 'subscr_payment',
+        'subscr_id' => $subscr_id,
+        'last_name' => $lastname,
+        'residence_country' => 'AU',
+        'item_name' => $order_title,
+        'payment_gross' => sprintf("0.2f", $amount),
+        'mc_currency' => 'USD',
+        'business' => $site_email,
+        'payment_type' => 'instant',
+        'protection_eligibility' => 'Ineligible',
+        'verify_sign' => 'ADcTLhZXAOjhiy0C89yIcZ88CzBWADhlrLg1DyMqv-xDus-qyJrrmsvo',
+        'payer_status' => 'unverified',
+        'payer_email' => $payer_email,
+        'txn_id' => '58H79324DK124573U',
+        'receiver_email' => $site_email,
+        'first_name' => $firstname,
+        'invoice' => $order_id .'-EPK',
+        'payer_id' => '6XGCGCPH8W534',
+        'receiver_id' => 'GWA2A76YCPXVQ',
+        'payment_status' => 'Completed',
+        'payment_fee' => '2.63',
+        'mc_fee' => '2.63',
+        'mc_gross' => sprintf("0.2f", $amount),
+        'charset' => 'windows-1252',
+        'notify_version' => '2.8',
+      ),
+      'subscr_cancel' => array(
+        'txn_type' => 'subscr_cancel',
+        'subscr_id' => $subscr_id,
+        'last_name' => $lastname,
+        'residence_country' => 'AU',
+        'mc_currency' => 'USD',
+        'item_name' => $order_title,
+        'amount1' => '20.00',
+        'business' => $site_email,
+        'amount3' => '50.00',
+        'recurring' => '1',
+        'verify_sign' => 'AFcWxV21C7fd0v3bYYYRCpSSRl31ARFS9PJtnu4RIGItZ5.Ob4xzwvYZ',
+        'payer_status' => 'verified',
+        'payer_email' => $payer_email,
+        'first_name' => $firstname,
+        'receiver_email' => $site_email,
+        'payer_id' => 'WAKK3E8Z9J3EE',
+        'invoice' => $order_id .'-BDK',
+        'reattempt' => '1',
+        'payer_business_name' => 'Business',
+        'subscr_date' => '11:50:37 Sep 02, 2009 PDT',
+        'charset' => 'windows-1252',
+        'notify_version' => '2.8',
+        'period1' => '7 D',
+        'mc_amount1' => '20.00',
+        'period3' => '1 M',
+        'mc_amount3' => '50.00',
+      ),
+      'subscr_eot' => array(
+        'txn_type' => 'subscr_eot',
+        'subscr_id' => $subscr_id,
+        'last_name' => $lastname,
+        'residence_country' => 'AU',
+        'item_name' => $order_title,
+        'mc_currency' => 'USD',
+        'business' => $site_email,
+        'verify_sign' => 'AdQt9JQnh.MOM7Fe6O8DQY7ve6g3ATrYHEG3jPMHBdHlDnTBZeEEQKDR',
+        'payer_status' => 'verified',
+        'payer_email' => $payer_email,
+        'first_name' => $firstname,
+        'receiver_email' => $site_email,
+        'payer_id' => 'SJKZMSLWS4J54',
+        'invoice' => $order_id .'-MSX',
+        'charset' => 'windows-1252',
+        'notify_version' => '2.8',
+      ),
+    );
+    return $messages[$msg_type];
+  }
+}
diff --git uc_recurring.module uc_recurring.module
index 2b2dd27..4461607 100644
--- uc_recurring.module
+++ uc_recurring.module
@@ -514,7 +514,7 @@ function uc_recurring_default_handler() {
  */
 function uc_recurring_includes() {
   $return = array();
-  $modules = array('uc_paypal', 'test_gateway', 'uc_credit');
+  $modules = array('test_gateway', 'uc_credit');
   foreach ($modules as $module) {
     if (module_exists($module)) {
       module_load_include('inc', 'uc_recurring', '/modules/uc_recurring.'. $module);
diff --git uc_recurring.test uc_recurring.test
index f1f81d4..349fd15 100644
--- uc_recurring.test
+++ uc_recurring.test
@@ -33,6 +33,32 @@ class ucRecurringTestCase extends UbercartTestCase {
     return $feature;
   }
 
+  function createUsers() {
+    // Create a store administrator user account.
+    $this->user_recurring_admin = $this->drupalCreateUser(array(
+      'administer conditional actions',
+      'administer order workflow',
+      'create orders',
+      'delete orders',
+      'edit orders',
+      'view all orders',
+      'administer product classes',
+      'administer product features',
+      'administer products',
+      'create products',
+      'delete all products',
+      'edit all products',
+      'administer store',
+      'view customers',
+      'view store reports',
+      'administer recurring fees',
+    ));
+    $this->user_recurring_customer = $this->drupalCreateUser(array(
+      'view own orders',
+      'view own recurring fees'
+    ));
+  }
+
   /**
    * Returns the last order_id added in db
    */
@@ -131,29 +157,7 @@ class ucRecurringAPITestCase extends ucRecurringTestCase {
   function setUp() {
     parent::setUp('uc_recurring');
 
-    // Create a store administrator user account.
-    $this->user_recurring_admin = $this->drupalCreateUser(array(
-      'administer conditional actions',
-      'administer order workflow',
-      'create orders',
-      'delete orders',
-      'edit orders',
-      'view all orders',
-      'administer product classes',
-      'administer product features',
-      'administer products',
-      'create products',
-      'delete all products',
-      'edit all products',
-      'administer store',
-      'view customers',
-      'view store reports',
-      'administer recurring fees',
-    ));
-    $this->user_recurring_customer = $this->drupalCreateUser(array(
-      'view own orders',
-      'view own recurring fees'
-    ));
+    $this->createUsers();
   }
 
   /**
@@ -280,29 +284,7 @@ class ucRecurringIntegrationTestCase extends ucRecurringTestCase {
   function setUp() {
     parent::setUp('uc_recurring', 'uc_payment', 'uc_recurring_mock_gateway');
 
-    // Create a store administrator user account.
-    $this->user_recurring_admin = $this->drupalCreateUser(array(
-      'administer conditional actions',
-      'administer order workflow',
-      'create orders',
-      'delete orders',
-      'edit orders',
-      'view all orders',
-      'administer product classes',
-      'administer product features',
-      'administer products',
-      'create products',
-      'delete all products',
-      'edit all products',
-      'administer store',
-      'view customers',
-      'view store reports',
-      'administer recurring fees',
-    ));
-    $this->user_recurring_customer = $this->drupalCreateUser(array(
-      'view own orders',
-      'view own recurring fees'
-    ));
+    $this->createUsers();
   }
 
   /**
