* @param array $params
* @param bool $processContributionObject
*
- * @return array
- *
* @throws CRM_Core_Exception
* @throws \CiviCRM_API3_Exception
* @deprecated
array_search('Failed', $contributionStatuses),
])
) {
- return $updateResult;
+ return;
}
if (!$componentName || !$componentId) {
// do check for required ids.
if (empty($componentDetails['membership']) && empty($componentDetails['participant']) && empty($componentDetails['pledge_payment']) || empty($componentDetails['contact_id'])) {
- return $updateResult;
+ return;
}
$input = $ids = [];
])
) {
// this is case when we already processed contribution object.
- return $updateResult;
+ return;
}
elseif (!$previousContriStatusId &&
!in_array($contributionStatuses[$contribution->contribution_status_id], [
])
) {
// this is case when we are going to process contribution object later.
- return $updateResult;
+ return;
}
if (is_array($memberships)) {
);
}
- $updateResult['updatedComponents']['CiviMember'] = $membership->status_id;
if ($processContributionObject) {
$processContribution = TRUE;
}
$updatedStatusId = array_search('Registered', $participantStatuses);
CRM_Event_BAO_Participant::updateParticipantStatus($participant->id, $oldStatus, $updatedStatusId, TRUE);
- $updateResult['updatedComponents']['CiviEvent'] = $updatedStatusId;
if ($processContributionObject) {
$processContribution = TRUE;
}
if ($pledgePayment) {
CRM_Pledge_BAO_PledgePayment::updatePledgePaymentStatus($pledgeID, $pledgePaymentIDs, $contributionStatusId);
- $updateResult['updatedComponents']['CiviPledge'] = $contributionStatusId;
if ($processContributionObject) {
$processContribution = TRUE;
}
$contribution = CRM_Contribute_BAO_Contribution::create($contributionParams);
}
- return $updateResult;
}
/**