[Ref] remove calls to, and deprecate, pending function
[civicrm-core.git] / CRM / Core / Payment / BaseIPN.php
CommitLineData
6a488035
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
bc77d7c0 4 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 5 | |
bc77d7c0
TO
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
6a488035 9 +--------------------------------------------------------------------+
d25dd0ee 10 */
6a488035
TO
11
12/**
1d86918a 13 * Class CRM_Core_Payment_BaseIPN.
6a488035
TO
14 */
15class CRM_Core_Payment_BaseIPN {
16
518fa0ee 17 public static $_now = NULL;
8196c759 18
c8aa607b 19 /**
20 * Input parameters from payment processor. Store these so that
21 * the code does not need to keep retrieving from the http request
22 * @var array
23 */
be2fb01f 24 protected $_inputParameters = [];
c8aa607b 25
59cdadfc 26 /**
27 * Only used by AuthorizeNetIPN.
518fa0ee 28 * @var bool
59cdadfc 29 *
30 * @deprecated
31 *
59cdadfc 32 */
937cf542
EM
33 protected $_isRecurring = FALSE;
34
59cdadfc 35 /**
36 * Only used by AuthorizeNetIPN.
518fa0ee 37 * @var bool
59cdadfc 38 *
39 * @deprecated
40 *
59cdadfc 41 */
937cf542 42 protected $_isFirstOrLastRecurringPayment = FALSE;
353ffa53 43
8196c759 44 /**
fe482240 45 * Constructor.
8196c759 46 */
00be9182 47 public function __construct() {
6a488035
TO
48 self::$_now = date('YmdHis');
49 }
50
c8aa607b 51 /**
fe482240 52 * Store input array on the class.
77b97be7 53 *
c8aa607b 54 * @param array $parameters
77b97be7
EM
55 *
56 * @throws CRM_Core_Exception
c8aa607b 57 */
00be9182 58 public function setInputParameters($parameters) {
22e263ad 59 if (!is_array($parameters)) {
cc0c30cc 60 throw new CRM_Core_Exception('Invalid input parameters');
c8aa607b 61 }
62 $this->_inputParameters = $parameters;
63 }
353ffa53 64
8196c759 65 /**
1d86918a
EM
66 * Validate incoming data.
67 *
68 * This function is intended to ensure that incoming data matches
8196c759 69 * It provides a form of pseudo-authentication - by checking the calling fn already knows
70 * the correct contact id & contribution id (this can be problematic when that has changed in
71 * the meantime for transactions that are delayed & contacts are merged in-between. e.g
72 * Paypal allows you to resend Instant Payment Notifications if you, for example, moved site
73 * and didn't update your IPN URL.
74 *
6a0b768e
TO
75 * @param array $input
76 * Interpreted values from the values returned through the IPN.
77 * @param array $ids
78 * More interpreted values (ids) from the values returned through the IPN.
79 * @param array $objects
80 * An empty array that will be populated with loaded object.
81 * @param bool $required
82 * Boolean Return FALSE if the relevant objects don't exist.
83 * @param int $paymentProcessorID
84 * Id of the payment processor ID in use.
1d86918a 85 *
5c766a0b 86 * @return bool
8196c759 87 */
ad64fa72 88 public function validateData($input, &$ids, &$objects, $required = TRUE, $paymentProcessorID = NULL) {
6a488035 89
21843539 90 // Check if the contribution exists
6a488035 91 // make sure contribution exists and is valid
5a9c68ac 92 $contribution = new CRM_Contribute_BAO_Contribution();
6a488035
TO
93 $contribution->id = $ids['contribution'];
94 if (!$contribution->find(TRUE)) {
92fcb95f 95 CRM_Core_Error::debug_log_message("Could not find contribution record: {$contribution->id} in IPN request: " . print_r($input, TRUE));
6a488035
TO
96 echo "Failure: Could not find contribution record for {$contribution->id}<p>";
97 return FALSE;
98 }
21843539
SL
99
100 // make sure contact exists and is valid
101 // use the contact id from the contribution record as the id in the IPN may not be valid anymore.
102 $contact = new CRM_Contact_BAO_Contact();
103 $contact->id = $contribution->contact_id;
104 $contact->find(TRUE);
105 if ($contact->id != $ids['contact']) {
106 // If the ids do not match then it is possible the contact id in the IPN has been merged into another contact which is why we use the contact_id from the contribution
107 CRM_Core_Error::debug_log_message("Contact ID in IPN {$ids['contact']} not found but contact_id found in contribution {$contribution->contact_id} used instead");
108 echo "WARNING: Could not find contact record: {$ids['contact']}<p>";
109 $ids['contact'] = $contribution->contact_id;
110 }
111
112 if (!empty($ids['contributionRecur'])) {
113 $contributionRecur = new CRM_Contribute_BAO_ContributionRecur();
114 $contributionRecur->id = $ids['contributionRecur'];
115 if (!$contributionRecur->find(TRUE)) {
116 CRM_Core_Error::debug_log_message("Could not find contribution recur record: {$ids['ContributionRecur']} in IPN request: " . print_r($input, TRUE));
117 echo "Failure: Could not find contribution recur record: {$ids['ContributionRecur']}<p>";
118 return FALSE;
119 }
120 }
121
6a488035 122 $contribution->receive_date = CRM_Utils_Date::isoToMysql($contribution->receive_date);
d9924163 123 $contribution->receipt_date = CRM_Utils_Date::isoToMysql($contribution->receipt_date);
6a488035
TO
124
125 $objects['contact'] = &$contact;
126 $objects['contribution'] = &$contribution;
d0488f03 127
128 // CRM-19478: handle oddity when p=null is set in place of contribution page ID,
129 if (!empty($ids['contributionPage']) && !is_numeric($ids['contributionPage'])) {
130 // We don't need to worry if about removing contribution page id as it will be set later in
131 // CRM_Contribute_BAO_Contribution::loadRelatedObjects(..) using $objects['contribution']->contribution_page_id
132 unset($ids['contributionPage']);
133 }
134
6a488035
TO
135 if (!$this->loadObjects($input, $ids, $objects, $required, $paymentProcessorID)) {
136 return FALSE;
137 }
a284891b
EM
138 //the process is that the loadObjects is kind of hacked by loading the objects for the original contribution and then somewhat inconsistently using them for the
139 //current contribution. Here we ensure that the original contribution is available to the complete transaction function
140 //we don't want to fix this in the payment processor classes because we would have to fix all of them - so better to fix somewhere central
141 if (isset($objects['contributionRecur'])) {
142 $objects['first_contribution'] = $objects['contribution'];
143 }
6a488035
TO
144 return TRUE;
145 }
146
8196c759 147 /**
fe482240 148 * Load objects related to contribution.
6a488035
TO
149 *
150 * @input array information from Payment processor
dd244018 151 *
3aaa68fb 152 * @param array $input
8196c759 153 * @param array $ids
154 * @param array $objects
6a0b768e
TO
155 * @param bool $required
156 * @param int $paymentProcessorID
8196c759 157 * @param array $error_handling
dd244018 158 *
3aaa68fb 159 * @return bool|array
6a488035 160 */
ad64fa72 161 public function loadObjects($input, &$ids, &$objects, $required, $paymentProcessorID, $error_handling = NULL) {
6a488035
TO
162 if (empty($error_handling)) {
163 // default options are that we log an error & echo it out
164 // note that we should refactor this error handling into error code @ some point
165 // but for now setting up enough separation so we can do unit tests
be2fb01f 166 $error_handling = [
6a488035
TO
167 'log_error' => 1,
168 'echo_error' => 1,
be2fb01f 169 ];
6a488035
TO
170 }
171 $ids['paymentProcessor'] = $paymentProcessorID;
172 if (is_a($objects['contribution'], 'CRM_Contribute_BAO_Contribution')) {
173 $contribution = &$objects['contribution'];
174 }
175 else {
176 //legacy support - functions are 'used' to be able to pass in a DAO
177 $contribution = new CRM_Contribute_BAO_Contribution();
9c1bc317 178 $contribution->id = $ids['contribution'] ?? NULL;
6a488035
TO
179 $contribution->find(TRUE);
180 $objects['contribution'] = &$contribution;
181 }
182 try {
276e3ec6 183 $success = $contribution->loadRelatedObjects($input, $ids);
184 if ($required && empty($contribution->_relatedObjects['paymentProcessor'])) {
185 throw new CRM_Core_Exception("Could not find payment processor for contribution record: " . $contribution->id);
186 }
6a488035 187 }
353ffa53 188 catch (Exception $e) {
cc0c30cc 189 $success = FALSE;
a7488080 190 if (!empty($error_handling['log_error'])) {
6a488035
TO
191 CRM_Core_Error::debug_log_message($e->getMessage());
192 }
a7488080 193 if (!empty($error_handling['echo_error'])) {
6c552737 194 echo $e->getMessage();
6a488035 195 }
a7488080 196 if (!empty($error_handling['return_error'])) {
be2fb01f 197 return [
6a488035
TO
198 'is_error' => 1,
199 'error_message' => ($e->getMessage()),
be2fb01f 200 ];
6a488035
TO
201 }
202 }
203 $objects = array_merge($objects, $contribution->_relatedObjects);
204 return $success;
205 }
206
8196c759 207 /**
fe482240 208 * Set contribution to failed.
28de42d1 209 *
8196c759 210 * @param array $objects
211 * @param object $transaction
212 * @param array $input
28de42d1 213 *
5c766a0b 214 * @return bool
e44c82e1 215 * @throws \CiviCRM_API3_Exception
8196c759 216 */
be2fb01f 217 public function failed(&$objects, &$transaction, $input = []) {
6a488035 218 $contribution = &$objects['contribution'];
be2fb01f 219 $memberships = [];
a7488080 220 if (!empty($objects['membership'])) {
6a488035
TO
221 $memberships = &$objects['membership'];
222 if (is_numeric($memberships)) {
be2fb01f 223 $memberships = [$objects['membership']];
6a488035
TO
224 }
225 }
226
227 $addLineItems = FALSE;
228 if (empty($contribution->id)) {
229 $addLineItems = TRUE;
230 }
231 $participant = &$objects['participant'];
232
3aaa68fb 233 // CRM-15546
be2fb01f 234 $contributionStatuses = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'contribution_status_id', [
518fa0ee
SL
235 'labelColumn' => 'name',
236 'flip' => 1,
237 ]);
e44c82e1 238 $contribution->contribution_status_id = $contributionStatuses['Failed'];
5a9c68ac
PJ
239 $contribution->receive_date = CRM_Utils_Date::isoToMysql($contribution->receive_date);
240 $contribution->receipt_date = CRM_Utils_Date::isoToMysql($contribution->receipt_date);
241 $contribution->thankyou_date = CRM_Utils_Date::isoToMysql($contribution->thankyou_date);
6a488035
TO
242 $contribution->save();
243
28de42d1 244 // Add line items for recurring payments.
a7488080 245 if (!empty($objects['contributionRecur']) && $objects['contributionRecur']->id && $addLineItems) {
e577770c 246 CRM_Contribute_BAO_ContributionRecur::addRecurLineItems($objects['contributionRecur']->id, $contribution);
6a488035
TO
247 }
248
8381af80 249 //add new soft credit against current contribution id and
6357981e 250 //copy initial contribution custom fields for recurring contributions
a7488080 251 if (!empty($objects['contributionRecur']) && $objects['contributionRecur']->id) {
e577770c
EM
252 CRM_Contribute_BAO_ContributionRecur::addrecurSoftCredit($objects['contributionRecur']->id, $contribution->id);
253 CRM_Contribute_BAO_ContributionRecur::copyCustomValues($objects['contributionRecur']->id, $contribution->id);
6357981e
PJ
254 }
255
0bad10e7 256 if (empty($input['IAmAHorribleNastyBeyondExcusableHackInTheCRMEventFORMTaskClassThatNeedsToBERemoved'])) {
6a488035
TO
257 if (!empty($memberships)) {
258 foreach ($memberships as $membership) {
56c7d914
MWMC
259 // @fixme Should we cancel only Pending memberships? per cancelled()
260 $this->cancelMembership($membership, $membership->status_id, FALSE);
6a488035
TO
261 }
262 }
d63f4fc3 263
6a488035 264 if ($participant) {
56c7d914 265 $this->cancelParticipant($participant->id);
6a488035
TO
266 }
267 }
268
269 $transaction->commit();
e44c82e1 270 Civi::log()->debug("Setting contribution status to Failed");
6a488035
TO
271 return TRUE;
272 }
273
8196c759 274 /**
fe482240 275 * Handled pending contribution status.
1d86918a 276 *
0e89200f 277 * @deprecated
278 *
8196c759 279 * @param array $objects
280 * @param object $transaction
1d86918a 281 *
5c766a0b 282 * @return bool
8196c759 283 */
00be9182 284 public function pending(&$objects, &$transaction) {
0e89200f 285 CRM_Core_Error::deprecatedFunctionWarning('This function will be removed at some point');
6a488035 286 $transaction->commit();
0e89200f 287 Civi::log()->debug('Returning since contribution status is Pending');
288 echo 'Success: Returning since contribution status is pending<p>';
6a488035
TO
289 return TRUE;
290 }
291
6c786a9b 292 /**
1d86918a
EM
293 * Process cancelled payment outcome.
294 *
3aaa68fb 295 * @param array $objects
296 * @param CRM_Core_Transaction $transaction
6c786a9b
EM
297 * @param array $input
298 *
299 * @return bool
e44c82e1 300 * @throws \CiviCRM_API3_Exception
6c786a9b 301 */
be2fb01f 302 public function cancelled(&$objects, &$transaction, $input = []) {
6a488035 303 $contribution = &$objects['contribution'];
e44c82e1
MWMC
304 $memberships = [];
305 if (!empty($objects['membership'])) {
306 $memberships = &$objects['membership'];
307 if (is_numeric($memberships)) {
308 $memberships = [$objects['membership']];
309 }
6a488035
TO
310 }
311
6a488035
TO
312 $addLineItems = FALSE;
313 if (empty($contribution->id)) {
314 $addLineItems = TRUE;
315 }
e44c82e1
MWMC
316 $participant = &$objects['participant'];
317
318 // CRM-15546
be2fb01f 319 $contributionStatuses = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'contribution_status_id', [
518fa0ee
SL
320 'labelColumn' => 'name',
321 'flip' => 1,
322 ]);
71d085fe 323 $contribution->contribution_status_id = $contributionStatuses['Cancelled'];
6a488035
TO
324 $contribution->receive_date = CRM_Utils_Date::isoToMysql($contribution->receive_date);
325 $contribution->receipt_date = CRM_Utils_Date::isoToMysql($contribution->receipt_date);
326 $contribution->thankyou_date = CRM_Utils_Date::isoToMysql($contribution->thankyou_date);
e44c82e1 327 $contribution->cancel_date = self::$_now;
9c1bc317 328 $contribution->cancel_reason = $input['reasonCode'] ?? NULL;
6a488035
TO
329 $contribution->save();
330
e44c82e1 331 // Add line items for recurring payments.
a7488080 332 if (!empty($objects['contributionRecur']) && $objects['contributionRecur']->id && $addLineItems) {
e577770c 333 CRM_Contribute_BAO_ContributionRecur::addRecurLineItems($objects['contributionRecur']->id, $contribution);
6a488035
TO
334 }
335
8381af80 336 //add new soft credit against current $contribution and
6357981e 337 //copy initial contribution custom fields for recurring contributions
a7488080 338 if (!empty($objects['contributionRecur']) && $objects['contributionRecur']->id) {
e577770c
EM
339 CRM_Contribute_BAO_ContributionRecur::addrecurSoftCredit($objects['contributionRecur']->id, $contribution->id);
340 CRM_Contribute_BAO_ContributionRecur::copyCustomValues($objects['contributionRecur']->id, $contribution->id);
6357981e
PJ
341 }
342
0bad10e7 343 if (empty($input['IAmAHorribleNastyBeyondExcusableHackInTheCRMEventFORMTaskClassThatNeedsToBERemoved'])) {
6a488035
TO
344 if (!empty($memberships)) {
345 foreach ($memberships as $membership) {
56c7d914
MWMC
346 if ($membership) {
347 $this->cancelMembership($membership, $membership->status_id);
6a488035
TO
348 }
349 }
350 }
d63f4fc3 351
6a488035 352 if ($participant) {
56c7d914 353 $this->cancelParticipant($participant->id);
6a488035
TO
354 }
355 }
356 $transaction->commit();
e44c82e1 357 Civi::log()->debug("Setting contribution status to Cancelled");
6a488035
TO
358 return TRUE;
359 }
360
6c786a9b 361 /**
1d86918a
EM
362 * Rollback unhandled outcomes.
363 *
3aaa68fb 364 * @param array $objects
365 * @param CRM_Core_Transaction $transaction
6c786a9b
EM
366 *
367 * @return bool
368 */
00be9182 369 public function unhandled(&$objects, &$transaction) {
6a488035 370 $transaction->rollback();
e44c82e1 371 Civi::log()->debug("Returning since contribution status is not handled");
2d8851f6 372 echo "Failure: contribution status is not handled<p>";
6a488035
TO
373 return FALSE;
374 }
375
56c7d914
MWMC
376 /**
377 * Logic to cancel a participant record when the related contribution changes to failed/cancelled.
378 * @todo This is part of a bigger refactor for dev/core/issues/927 - "duplicate" functionality exists in CRM_Contribute_BAO_Contribution::cancel()
379 *
380 * @param $participantID
381 *
382 * @throws \CiviCRM_API3_Exception
383 */
384 private function cancelParticipant($participantID) {
385 // @fixme https://lab.civicrm.org/dev/core/issues/927 Cancelling membership etc is not desirable for all use-cases and we should be able to disable it
386 $participantParams['id'] = $participantID;
387 $participantParams['status_id'] = 'Cancelled';
388 civicrm_api3('Participant', 'create', $participantParams);
389 }
390
391 /**
392 * Logic to cancel a membership record when the related contribution changes to failed/cancelled.
393 * @todo This is part of a bigger refactor for dev/core/issues/927 - "duplicate" functionality exists in CRM_Contribute_BAO_Contribution::cancel()
394 * @param \CRM_Member_BAO_Membership $membership
395 * @param int $membershipStatusID
396 * @param boolean $onlyCancelPendingMembership
397 * Do we only cancel pending memberships? OR memberships in any status? (see CRM-18688)
398 * @fixme Historically failed() cancelled membership in any status, cancelled() cancelled only pending memberships so we retain that behaviour for now.
399 *
400 */
401 private function cancelMembership($membership, $membershipStatusID, $onlyCancelPendingMembership = TRUE) {
402 // @fixme https://lab.civicrm.org/dev/core/issues/927 Cancelling membership etc is not desirable for all use-cases and we should be able to disable it
403 // Cancel only Pending memberships
404 $pendingMembershipStatusId = CRM_Core_PseudoConstant::getKey('CRM_Member_BAO_Membership', 'status_id', 'Pending');
405 if (($membershipStatusID == $pendingMembershipStatusId) || ($onlyCancelPendingMembership == FALSE)) {
406 $cancelledMembershipStatusId = CRM_Core_PseudoConstant::getKey('CRM_Member_BAO_Membership', 'status_id', 'Cancelled');
407
408 $membership->status_id = $cancelledMembershipStatusId;
409 $membership->save();
410
411 $params = ['status_id' => $cancelledMembershipStatusId];
412 CRM_Member_BAO_Membership::updateRelatedMemberships($membership->id, $params);
413
414 // @todo Convert the above to API
415 // $membershipParams = [
416 // 'id' => $membership->id,
417 // 'status_id' => $cancelledMembershipStatusId,
418 // ];
419 // civicrm_api3('Membership', 'create', $membershipParams);
420 // CRM_Member_BAO_Membership::updateRelatedMemberships($membershipParams['id'], ['status_id' => $cancelledMembershipStatusId]);
421 }
422
423 }
424
6c786a9b 425 /**
4a1ba425 426 * @deprecated
427 *
3ccde016 428 * Jumbled up function.
1d86918a 429 *
3ccde016
EM
430 * The purpose of this function is to transition a pending transaction to Completed including updating any
431 * related entities.
432 *
433 * It has been overloaded to also add recurring transactions to the database, cloning the original transaction and
434 * updating related entities.
435 *
436 * It is recommended to avoid calling this function directly and call the api functions:
437 * - contribution.completetransaction
438 * - contribution.repeattransaction
439 *
440 * These functions are the focus of testing efforts and more accurately reflect the division of roles
441 * (the job of the IPN class is to determine the outcome, transaction id, invoice id & to validate the source
442 * and from there it should be possible to pass off transaction management.)
443 *
444 * This function has been problematic for some time but there are now several tests via the api_v3_Contribution test
445 * and the Paypal & Authorize.net IPN tests so any refactoring should be done in conjunction with those.
446 *
5ca657dd 447 * This function needs to have the 'body' moved to the CRM_Contribute_BAO_Contribute class and to undergo
3ccde016
EM
448 * refactoring to separate the complete transaction and repeat transaction functionality into separate functions with
449 * a shared function that updates related components.
450 *
451 * Note that it is not necessary payment processor extension to implement an IPN class now. In general the code on the
452 * IPN class is better accessed through the api which de-jumbles it a bit.
453 *
454 * e.g the payment class can have a function like (based on Omnipay extension):
455 *
456 * public function handlePaymentNotification() {
457 * $response = $this->getValidatedOutcome();
458 * if ($response->isSuccessful()) {
459 * try {
460 * // @todo check if it is a repeat transaction & call repeattransaction instead.
461 * civicrm_api3('contribution', 'completetransaction', array('id' => $this->transaction_id));
462 * }
463 * catch (CiviCRM_API3_Exception $e) {
464 * if (!stristr($e->getMessage(), 'Contribution already completed')) {
465 * $this->handleError('error', $this->transaction_id . $e->getMessage(), 'ipn_completion', 9000, 'An error may
466 * have occurred. Please check your receipt is correct');
467 * $this->redirectOrExit('success');
468 * }
469 * elseif ($this->transaction_id) {
470 * civicrm_api3('contribution', 'create', array('id' => $this->transaction_id, 'contribution_status_id' =>
471 * 'Failed'));
472 * }
473 *
474 * @param array $input
475 * @param array $ids
476 * @param array $objects
3aaa68fb 477 * @param CRM_Core_Transaction $transaction
e44c82e1
MWMC
478 *
479 * @throws \CRM_Core_Exception
480 * @throws \CiviCRM_API3_Exception
6c786a9b 481 */
2e426931 482 public function completeTransaction(&$input, &$ids, &$objects, $transaction = NULL) {
2719dc91 483 CRM_Contribute_BAO_Contribution::completeOrder($input, $ids, $objects, $transaction);
6a488035
TO
484 }
485
6c786a9b 486 /**
1d86918a
EM
487 * Get site billing ID.
488 *
489 * @param array $ids
6c786a9b
EM
490 *
491 * @return bool
492 */
00be9182 493 public function getBillingID(&$ids) {
b576d770 494 $ids['billing'] = CRM_Core_BAO_LocationType::getBilling();
6a488035 495 if (!$ids['billing']) {
be2fb01f 496 CRM_Core_Error::debug_log_message(ts('Please set a location type of %1', [1 => 'Billing']));
6a488035
TO
497 echo "Failure: Could not find billing location type<p>";
498 return FALSE;
499 }
500 return TRUE;
501 }
502
c490a46a 503 /**
db59bb73
EM
504 * @deprecated
505 *
6626a693 506 * @todo confirm this function is not being used by any payment processor outside core & remove.
507 *
1d86918a 508 * Note that the compose message part has been moved to contribution
6a488035
TO
509 * In general LoadObjects is called first to get the objects but the composeMessageArray function now calls it
510 *
6a0b768e
TO
511 * @param array $input
512 * Incoming data from Payment processor.
513 * @param array $ids
514 * Related object IDs.
3aaa68fb 515 * @param array $objects
6a0b768e
TO
516 * @param array $values
517 * Values related to objects that have already been loaded.
518 * @param bool $recur
519 * Is it part of a recurring contribution.
520 * @param bool $returnMessageText
521 * Should text be returned instead of sent. This.
16b10e64 522 * is because the function is also used to generate pdfs
6c786a9b 523 *
c490a46a 524 * @return array
e44c82e1
MWMC
525 * @throws \CRM_Core_Exception
526 * @throws \CiviCRM_API3_Exception
6c786a9b 527 */
00be9182 528 public function sendMail(&$input, &$ids, &$objects, &$values, $recur = FALSE, $returnMessageText = FALSE) {
6626a693 529 return CRM_Contribute_BAO_Contribution::sendMail($input, $ids, $objects['contribution']->id, $values,
3425da09 530 $returnMessageText);
6a488035
TO
531 }
532
b2b0530a 533}