From 50cbd3d66bde55a1240becaaca16b59c9d22811a Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 30 Dec 2022 13:03:27 +1300 Subject: [PATCH] Remove legacy code payment processor handling --- CRM/Contribute/Form/ContributionBase.php | 30 ------------------------ 1 file changed, 30 deletions(-) diff --git a/CRM/Contribute/Form/ContributionBase.php b/CRM/Contribute/Form/ContributionBase.php index 108dfca458..bc9ef2cb0c 100644 --- a/CRM/Contribute/Form/ContributionBase.php +++ b/CRM/Contribute/Form/ContributionBase.php @@ -489,11 +489,6 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form { $this->_values['campaign_id'] = $campID; } - //do check for cancel recurring and clean db, CRM-7696 - if (CRM_Utils_Request::retrieve('cancel', 'Boolean')) { - self::cancelRecurring(); - } - // check if billing block is required for pay later if (!empty($this->_values['is_pay_later'])) { $this->_isBillingAddressRequiredForPayLater = $this->_values['is_billing_required'] ?? NULL; @@ -1125,31 +1120,6 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form { } } - /** - * Cancel recurring contributions. - * - * In case user cancel recurring contribution, - * When we get the control back from payment gate way - * lets delete the recurring and related contribution. - * - * @throws \CRM_Core_Exception - */ - public function cancelRecurring() { - $isCancel = CRM_Utils_Request::retrieve('cancel', 'Boolean'); - if ($isCancel) { - $isRecur = CRM_Utils_Request::retrieve('isRecur', 'Boolean'); - $recurId = CRM_Utils_Request::retrieve('recurId', 'Positive'); - //clean db for recurring contribution. - if ($isRecur && $recurId) { - CRM_Contribute_BAO_ContributionRecur::deleteRecurContribution($recurId); - } - $contribId = CRM_Utils_Request::retrieve('contribId', 'Positive'); - if ($contribId) { - CRM_Contribute_BAO_Contribution::deleteContribution($contribId); - } - } - } - /** * Determine if recurring parameters need to be added to the form parameters. * -- 2.25.1