From 02ccafc76f043f6b3beef47a1bc33ae646208eba Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 22 Dec 2023 09:53:36 +1300 Subject: [PATCH] Fix a few more places that pass bltID to mapParams --- CRM/Event/Form/Registration/Confirm.php | 4 ++-- CRM/Member/Form/Membership.php | 2 +- CRM/Member/Form/MembershipRenewal.php | 2 +- tests/phpunit/CRM/Member/Form/MembershipRenewalTest.php | 2 -- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CRM/Event/Form/Registration/Confirm.php b/CRM/Event/Form/Registration/Confirm.php index 75f4701601..4298e628dd 100644 --- a/CRM/Event/Form/Registration/Confirm.php +++ b/CRM/Event/Form/Registration/Confirm.php @@ -138,7 +138,7 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration { $preApprovalParams = $this->_paymentProcessor['object']->getPreApprovalDetails($this->get('pre_approval_parameters')); $params = array_merge($this->_params, $preApprovalParams); } - CRM_Core_Payment_Form::mapParams($this->_bltID, $params, $params, FALSE); + CRM_Core_Payment_Form::mapParams(NULL, $params, $params, FALSE); // set a few other parameters that are not really specific to this method because we don't know what // will break if we change this. @@ -500,7 +500,7 @@ class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration { } } elseif (!empty($participantRecord['is_primary'])) { - CRM_Core_Payment_Form::mapParams($this->_bltID, $participantRecord, $participantRecord, TRUE); + CRM_Core_Payment_Form::mapParams(NULL, $participantRecord, $participantRecord, TRUE); // payment email param can be empty for _bltID mapping // thus provide mapping for it with a different email value if (empty($participantRecord['email'])) { diff --git a/CRM/Member/Form/Membership.php b/CRM/Member/Form/Membership.php index 4c7e4b658d..e67d22caa4 100644 --- a/CRM/Member/Form/Membership.php +++ b/CRM/Member/Form/Membership.php @@ -1051,7 +1051,7 @@ DESC limit 1"); // This is a candidate for shared beginPostProcess function. // @todo Do we need this now we have $this->formatParamsForPaymentProcessor() ? - CRM_Core_Payment_Form::mapParams($this->_bltID, $formValues, $paymentParams, TRUE); + CRM_Core_Payment_Form::mapParams(NULL, $formValues, $paymentParams, TRUE); // CRM-7137 -for recurring membership, // we do need contribution and recurring records. $result = NULL; diff --git a/CRM/Member/Form/MembershipRenewal.php b/CRM/Member/Form/MembershipRenewal.php index ceb123cfea..60a87af891 100644 --- a/CRM/Member/Form/MembershipRenewal.php +++ b/CRM/Member/Form/MembershipRenewal.php @@ -539,7 +539,7 @@ class CRM_Member_Form_MembershipRenewal extends CRM_Member_Form { $paymentParams['contactID'] = $this->_contributorContactID; - CRM_Core_Payment_Form::mapParams($this->_bltID, $this->_params, $paymentParams, TRUE); + CRM_Core_Payment_Form::mapParams(NULL, $this->_params, $paymentParams, TRUE); if (!empty($this->_params['auto_renew'])) { diff --git a/tests/phpunit/CRM/Member/Form/MembershipRenewalTest.php b/tests/phpunit/CRM/Member/Form/MembershipRenewalTest.php index f22a7f0393..89885d6d3d 100644 --- a/tests/phpunit/CRM/Member/Form/MembershipRenewalTest.php +++ b/tests/phpunit/CRM/Member/Form/MembershipRenewalTest.php @@ -627,8 +627,6 @@ class CRM_Member_Form_MembershipRenewalTest extends CiviUnitTestCase { protected function getForm($formValues = [], $mode = 'test'): CRM_Member_Form_MembershipRenewal { /** @var CRM_Member_Form_MembershipRenewal $form */ $form = $this->getFormObject('CRM_Member_Form_MembershipRenewal', $formValues); - - $form->_bltID = 5; $form->_mode = $mode; $form->setEntityId($this->_membershipID); $form->preProcess(); -- 2.25.1