From e7309307116da31e6ee7da3a240692439fc6d936 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 3 Apr 2015 16:52:45 +1300 Subject: [PATCH] CRM-16255 pass contact_id to payment processor from backoffice participant form --- CRM/Core/Payment/Form.php | 1 + CRM/Event/Form/Participant.php | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CRM/Core/Payment/Form.php b/CRM/Core/Payment/Form.php index f8ee37e13d..865fa196db 100644 --- a/CRM/Core/Payment/Form.php +++ b/CRM/Core/Payment/Form.php @@ -392,6 +392,7 @@ class CRM_Core_Payment_Form { 'state_province' => "billing_state_province-$id", 'postal_code' => "billing_postal_code-$id", 'country' => "billing_country-$id", + 'contactID' => 'contact_id', ); } diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index 433e762d8a..ab8f474cc8 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -1189,7 +1189,14 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment if (!empty($this->_params['send_receipt'])) { $paymentParams['email'] = $this->_contributorEmail; } - CRM_Core_Payment_Form::mapParams($this->_bltID, $this->_params, $paymentParams, TRUE); + + // The only reason for merging in the 'contact_id' rather than ensuring it is set + // is that this patch is being done around the time of the stable release + // so more conservative approach is called for. + // In fact the use of $params and $this->_params & $this->_contactId vs $contactID + // needs rationalising. + $mapParams = array_merge(array('contact_id' => $contactID), $this->_params); + CRM_Core_Payment_Form::mapParams($this->_bltID, $mapParams, $paymentParams, TRUE); $payment = CRM_Core_Payment::singleton($this->_mode, $this->_paymentProcessor, $this); -- 2.25.1