From: Seamus Lee Date: Tue, 26 Jul 2016 05:06:55 +0000 (+1000) Subject: CRM-16923 Fix Enotice error by setting payment Processor id X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=be70dbacf0831d56ef361baf053f974af4807730;p=civicrm-core.git CRM-16923 Fix Enotice error by setting payment Processor id --- diff --git a/CRM/Contribute/Form/Task/PDF.php b/CRM/Contribute/Form/Task/PDF.php index ffb8cec42c..e239690521 100644 --- a/CRM/Contribute/Form/Task/PDF.php +++ b/CRM/Contribute/Form/Task/PDF.php @@ -182,6 +182,15 @@ AND {$this->_componentClause}"; $input['trxn_date'] = isset($contribution->trxn_date) ? $contribution->trxn_date : NULL; $input['receipt_update'] = $params['receipt_update']; $input['contribution_status_id'] = $contribution->contribution_status_id; + $payment_processor_id = NULL; + $processorDAO = CRM_Core_DAO::executeQuery("SELECT payment_processor_id + FROM civicrm_financial_trxn + WHERE trxn_id = %1", array( + 1 => array($contribution->trxn_id, 'String'))); + while ($processorDAO->fetch()) { + $payment_processor_id = $processorDAO->payment_processor_id; + } + $input['paymentProcessor'] = $payment_processor_id; // CRM_Contribute_BAO_Contribution::composeMessageArray expects mysql formatted date $objects['contribution']->receive_date = CRM_Utils_Date::isoToMysql($objects['contribution']->receive_date);