Merge pull request #5120 from eileenmcnaughton/CRM-15938
[civicrm-core.git] / CRM / Contribute / Form / ContributionView.php
index f6cb0536611ce885333fc15f60d8539a9df3a93c..6312a64d49d6048e95b5cadaded300f397653502 100644 (file)
@@ -40,7 +40,7 @@
 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
    */
@@ -73,6 +73,10 @@ class CRM_Contribute_Form_ContributionView extends CRM_Core_Form {
       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'])) {
@@ -199,7 +203,7 @@ class CRM_Contribute_Form_ContributionView extends CRM_Core_Form {
   }
 
   /**
-   * Build the form object
+   * Build the form object.
    *
    * @return void
    */