Skip to content
Snippets Groups Projects
Unverified Commit cf948a8a authored by Seamus Lee's avatar Seamus Lee Committed by GitHub
Browse files

Merge pull request #18730 from eileenmcnaughton/pp

financial#152 Remove unused parameters from BaseIPN->cancelled signature
parents 4c6f3d72 01ebb9d3
Branches
Tags
No related merge requests found
......@@ -235,13 +235,11 @@ class CRM_Core_Payment_BaseIPN {
* Process cancelled payment outcome.
*
* @param array $objects
* @param CRM_Core_Transaction $transaction
* @param array $input
*
* @return bool
* @throws \CiviCRM_API3_Exception
* @throws \CiviCRM_API3_Exception|\CRM_Core_Exception
*/
public function cancelled(&$objects, $transaction = NULL, $input = []) {
public function cancelled($objects) {
$contribution = &$objects['contribution'];
$memberships = [];
if (!empty($objects['membership'])) {
......@@ -264,7 +262,6 @@ class CRM_Core_Payment_BaseIPN {
]);
$contribution->contribution_status_id = $contributionStatuses['Cancelled'];
$contribution->cancel_date = self::$_now;
$contribution->cancel_reason = $input['reasonCode'] ?? NULL;
$contribution->save();
// Add line items for recurring payments.
......@@ -291,9 +288,6 @@ class CRM_Core_Payment_BaseIPN {
$this->cancelParticipant($participant->id);
}
if ($transaction) {
$transaction->commit();
}
Civi::log()->debug("Setting contribution status to Cancelled");
return TRUE;
}
......
......@@ -413,7 +413,7 @@ class CRM_Core_Payment_BaseIPNTest extends CiviUnitTestCase {
]);
$transaction = new CRM_Core_Transaction();
$this->IPN->cancelled($this->objects, $transaction);
$this->IPN->cancelled($this->objects);
$cancelledParticipantsCount = civicrm_api3('Participant', 'get', [
'sequential' => 1,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment