From: Dave Greenberg Date: Thu, 29 Jan 2015 23:48:20 +0000 (-0800) Subject: CRM-15721 - Add Payment Processor Name to View Contribution page. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2cc6b631584e149de29364027f9abf99817b32f8;p=civicrm-core.git 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 --- 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}