/**
  * Takes a bunch of params that are needed to match certain criteria and
  * retrieves the relevant objects. It also stores all the retrieved
  * values in the default array
  *
  * @param array $params   (reference ) an assoc array of name/value pairs
  * @param array $defaults (reference ) an assoc array to hold the flattened values
  *
  * @return object CRM_Core_DAO_PaymentProcessor object on success, null otherwise
  * @access public
  * @static
  */
 static function retrieve(&$params, &$defaults)
 {
     $paymentProcessor = new CRM_Core_DAO_PaymentProcessor();
     $paymentProcessor->copyValues($params);
     if ($paymentProcessor->find(true)) {
         CRM_Core_DAO::storeValues($paymentProcessor, $defaults);
         return $paymentProcessor;
     }
     return null;
 }