diff --git a/CRM/Core/Payment/iATSService.php b/CRM/Core/Payment/iATSService.php index 580a92ce..933c2ecd 100644 --- a/CRM/Core/Payment/iATSService.php +++ b/CRM/Core/Payment/iATSService.php @@ -22,6 +22,7 @@ */ use Civi\Payment\Exception\PaymentProcessorException; +use Civi\Payment\PropertyBag; /** * @@ -265,7 +266,7 @@ public function doPayment(&$params, $component = 'contribute') { } /** - * support corresponding CiviCRM method + * Support corresponding CiviCRM method */ public function changeSubscriptionAmount(&$message = '', $params = array()) { // $userAlert = ts('You have modified this recurring contribution.'); @@ -274,7 +275,8 @@ public function changeSubscriptionAmount(&$message = '', $params = array()) { } /** - * support corresponding CiviCRM method + * Support corresponding CiviCRM method + * ToDo: deprecated -> remove when ESR has a security update which will bring everyone >5.27 */ public function cancelSubscription(&$message = '', $params = array()) { $userAlert = ts('You have cancelled this recurring contribution.'); @@ -282,6 +284,16 @@ public function cancelSubscription(&$message = '', $params = array()) { return TRUE; } + /** + * Support corresponding CiviCRM method + * preferred function for Cancelling a Recurring Contribution as of 5.25 + * + * @return array|null[] + */ + public function doCancelRecurring(PropertyBag $propertyBag) { + return ['message' => ts('You have cancelled this recurring contribution.')]; + } + /** * Set additional fields when editing the schedule. *