From 2cc6b631584e149de29364027f9abf99817b32f8 Mon Sep 17 00:00:00 2001 From: Dave Greenberg Date: Thu, 29 Jan 2015 15:48:20 -0800 Subject: [PATCH] CRM-15721 - Add Payment Processor Name to View Contribution page. ---------------------------------------- * 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 | 4 ++++ templates/CRM/Contribute/Form/ContributionView.tpl | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CRM/Contribute/Form/ContributionView.php b/CRM/Contribute/Form/ContributionView.php index f6cb053661..03af773953 100644 --- a/CRM/Contribute/Form/ContributionView.php +++ b/CRM/Contribute/Form/ContributionView.php @@ -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'])) { diff --git a/templates/CRM/Contribute/Form/ContributionView.tpl b/templates/CRM/Contribute/Form/ContributionView.tpl index 09ce0f93aa..edcdef2b7d 100644 --- a/templates/CRM/Contribute/Form/ContributionView.tpl +++ b/templates/CRM/Contribute/Form/ContributionView.tpl @@ -150,7 +150,7 @@ {/if} {ts}Paid By{/ts} - {$payment_instrument} + {$payment_instrument}{if $payment_processor_name} ({$payment_processor_name}){/if} {if $payment_instrument eq 'Check'|ts} -- 2.25.1