From 507a7734f657a4077c96791e5109910c5d8f4518 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Tue, 7 Nov 2017 11:21:14 +1100 Subject: [PATCH] CRM-21400 Add a static var to hold the trxn_id so it can be accessed through hook_civicrm_buildForm --- CRM/Contribute/Form/Contribution/ThankYou.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/CRM/Contribute/Form/Contribution/ThankYou.php b/CRM/Contribute/Form/Contribution/ThankYou.php index f00974809e..ab41d6d203 100644 --- a/CRM/Contribute/Form/Contribution/ThankYou.php +++ b/CRM/Contribute/Form/Contribution/ThankYou.php @@ -41,6 +41,11 @@ class CRM_Contribute_Form_Contribution_ThankYou extends CRM_Contribute_Form_Cont */ public $_useForMember; + /** + * Tranxaaction Id of the current contribution + */ + public $_trxnId; + /** * Set variables up before form is built. */ @@ -214,11 +219,10 @@ class CRM_Contribute_Form_Contribution_ThankYou extends CRM_Contribute_Form_Cont $this->buildCustom($this->_values['onbehalf_profile_id'], 'onbehalfProfile', TRUE, 'onbehalf', $fieldTypes); } - $this->assign('trxn_id', - CRM_Utils_Array::value('trxn_id', - $this->_params - ) - ); + $this->_trxnId = CRM_Utils_Array::value('trxn_id', $this->_params); + + $this->assign('trxn_id', $this->_trxnId); + $this->assign('receive_date', CRM_Utils_Date::mysqlToIso(CRM_Utils_Array::value('receive_date', $this->_params)) ); -- 2.25.1