Fix a few more places that pass bltID to mapParams
authorEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 21 Dec 2023 20:53:36 +0000 (09:53 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 21 Dec 2023 20:53:36 +0000 (09:53 +1300)
CRM/Event/Form/Registration/Confirm.php
CRM/Member/Form/Membership.php
CRM/Member/Form/MembershipRenewal.php
tests/phpunit/CRM/Member/Form/MembershipRenewalTest.php

index 75f4701601d69ae84cf78d2c8368a0cf911b1752..4298e628dd723699f97e8ea838e69880df3b8e3b 100644 (file)
@@ -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'])) {
index 4c7e4b658dd8ca14f5bbd503ae5adf3992d876a0..e67d22caa403f4154cb80a42b840dbfe5be3a226 100644 (file)
@@ -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;
index ceb123cfea7edba155ebf48b6f63f3c48ef6dce7..60a87af891df084b87715df5f5028168b423712d 100644 (file)
@@ -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'])) {
 
index f22a7f039314441d165a5ef509fa983d6a94db63..89885d6d3dd9194a0aabe84d109eddec022131c5 100644 (file)
@@ -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();