* Set contribution to failed.
*
* @param array $objects
- * @param object $transaction
- * @param array $input
*
* @return bool
- * @throws \CiviCRM_API3_Exception
+ * @throws \CiviCRM_API3_Exception|\CRM_Core_Exception
*/
- public function failed(&$objects, $transaction = NULL, $input = []) {
+ public function failed($objects) {
$contribution = &$objects['contribution'];
$memberships = [];
if (!empty($objects['membership'])) {
$this->cancelParticipant($participant->id);
}
- if ($transaction) {
- $transaction->commit();
- }
Civi::log()->debug("Setting contribution status to Failed");
return TRUE;
}
'status_id' => 'Pending from incomplete transaction',
]);
- $transaction = new CRM_Core_Transaction();
- $this->IPN->failed($this->objects, $transaction);
+ $this->IPN->failed($this->objects);
$cancelledParticipantsCount = civicrm_api3('Participant', 'get', [
'sequential' => 1,