/**
  * singleton function used to manage this object
  *
  * @param string $mode
  *   The mode of operation: live or test
  *
  * @return object
  * @static
  */
 static function &singleton($mode, $component, &$paymentProcessor)
 {
     if (self::$_singleton === NULL) {
         self::$_singleton = new self($mode, $paymentProcessor);
     }
     return self::$_singleton;
 }