$params = [
'component_id' => $participantId,
- 'componentName' => 'Event',
'contribution_id' => $contributionId,
'contribution_status_id' => $contributionStatusId,
'IAmAHorribleNastyBeyondExcusableHackInTheCRMEventFORMTaskClassThatNeedsToBERemoved' => 1,
// get minimum required values.
$statusId = $params['contribution_status_id'] ?? NULL;
$componentId = $params['component_id'] ?? NULL;
- $componentName = $params['componentName'] ?? NULL;
$contributionId = $params['contribution_id'] ?? NULL;
$input = $ids = $objects = [];
//get the required ids.
$ids['contribution'] = $contributionId;
+ $ids['participant'] = $params['component_id'];
if (!$ids['contact'] = CRM_Utils_Array::value('contact_id', $params)) {
$ids['contact'] = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_Contribution',
);
}
- if ($componentName === 'Event') {
- $name = 'event';
- $ids['participant'] = $componentId;
-
- if (!$ids['event'] = CRM_Utils_Array::value('event_id', $params)) {
- $ids['event'] = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Participant',
- $componentId,
- 'event_id'
- );
- }
+ if (!$ids['event'] = CRM_Utils_Array::value('event_id', $params)) {
+ $ids['event'] = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Participant',
+ $componentId,
+ 'event_id'
+ );
}
- if ($componentName === 'Membership') {
- $name = 'contribute';
- $ids['membership'] = $componentId;
- }
- $ids['contributionPage'] = NULL;
- $ids['contributionRecur'] = NULL;
- $input['component'] = $name;
+ $input['component'] = 'event';
$baseIPN = new CRM_Core_Payment_BaseIPN();