_civicrm_api3_custom_format_params($params, $values, 'Participant');
$params = array_merge($values, $params);
$participantBAO = CRM_Event_BAO_Participant::create($params);
_civicrm_api3_custom_format_params($params, $values, 'Participant');
$params = array_merge($values, $params);
$participantBAO = CRM_Event_BAO_Participant::create($params);