| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
class CRM_Contribute_Form_ContributionView extends CRM_Core_Form {
/**
- * Set variables up before form is built
+ * Set variables up before form is built.
*
* @return void
*/
public function preProcess() {
- $id = $this->get('id');
- $values = $ids = array();
- $params = array('id' => $id);
+ $id = $this->get('id');
+ $values = $ids = array();
+ $params = array('id' => $id);
$context = CRM_Utils_Request::retrieve('context', 'String', $this);
$this->assign('context', $context);
if ($values['to_financial_account_id']) {
$values['to_financial_account'] = CRM_Contribute_PseudoConstant::financialAccount($values['to_financial_account_id']);
}
+ $values['payment_processor_id'] = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialTrxn', $financialTrxnId['financialTrxnId'], 'payment_processor_id');
+ if ($values['payment_processor_id']) {
+ $values['payment_processor_name'] = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_PaymentProcessor', $values['payment_processor_id'], 'name');
+ }
}
if (!empty($values['contribution_recur_id'])) {
- $sql = "SELECT installments, frequency_interval, frequency_unit FROM civicrm_contribution_recur WHERE id = %1";
+ $sql = "SELECT installments, frequency_interval, frequency_unit FROM civicrm_contribution_recur WHERE id = %1";
$params = array(1 => array($values['contribution_recur_id'], 'Integer'));
- $dao = CRM_Core_DAO::executeQuery($sql, $params);
+ $dao = CRM_Core_DAO::executeQuery($sql, $params);
if ($dao->fetch()) {
$values['recur_installments'] = $dao->installments;
$values['recur_frequency_unit'] = $dao->frequency_unit;
}
/**
- * Build the form object
+ * Build the form object.
*
* @return void
*/
)
);
}
+
}