CRM-15721 - Add Payment Processor Name to View Contribution page.
authorDave Greenberg <dave@civicrm.org>
Thu, 29 Jan 2015 23:48:20 +0000 (15:48 -0800)
committerDave Greenberg <dave@civicrm.org>
Thu, 29 Jan 2015 23:48:20 +0000 (15:48 -0800)
----------------------------------------
* CRM-15721: Associate contributions with the payment processor used to make it
  https://issues.civicrm.org/jira/browse/CRM-15721

CRM/Contribute/Form/ContributionView.php
templates/CRM/Contribute/Form/ContributionView.tpl

index f6cb0536611ce885333fc15f60d8539a9df3a93c..03af773953d8ed939f85ed03f8f63e5854202f60 100644 (file)
@@ -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'])) {
index 09ce0f93aad91533c4cf6926cd002f211bec4e51..edcdef2b7d988ca18ae5f70832cb5c32c39ae737 100644 (file)
   {/if}
   <tr>
     <td class="label">{ts}Paid By{/ts}</td>
-    <td>{$payment_instrument}</td>
+    <td>{$payment_instrument}{if $payment_processor_name} ({$payment_processor_name}){/if}</td>
   </tr>
 
   {if $payment_instrument eq 'Check'|ts}