*/
public $_onlinePendingContributionId = NULL;
+ /**
+ * Explicitly declare the entity api name.
+ */
+ public function getDefaultEntity() {
+ return 'Participant';
+ }
+
/**
* Set variables up before form is built.
*
$this->_action = CRM_Core_Action::COPY;
break;
}
- parent::preProcess();
+ CRM_Contact_Form_Task::preProcessCommon($this);
$this->_single = FALSE;
$this->_contactId = NULL;
unset($params['amount']);
}
$params['register_date'] = CRM_Utils_Date::processDate($params['register_date'], $params['register_date_time']);
- $params['receive_date'] = CRM_Utils_Date::processDate(CRM_Utils_Array::value('receive_date', $params));
+ $params['receive_date'] = CRM_Utils_Date::processDate(CRM_Utils_Array::value('receive_date', $params), CRM_Utils_Array::value('receive_date_time', $params));
$params['contact_id'] = $this->_contactId;
// overwrite actual payment amount if entered
$customFields = CRM_Utils_Array::crmArrayMerge($customFieldsEvent, $customFields);
$customFields = CRM_Utils_Array::crmArrayMerge($customFieldsEventType, $customFields);
$params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
- $customFields,
$this->_id,
'Participant'
);
// CRM-15622: fix for incorrect contribution.fee_amount
$paymentParams['fee_amount'] = NULL;
- $result = $payment->doDirectPayment($paymentParams);
+ $result = $payment->doPayment($paymentParams);
if (is_a($result, 'CRM_Core_Error')) {
CRM_Core_Error::displaySessionError($result);
//add custom data for participant
CRM_Core_BAO_CustomValueTable::postProcess($this->_params,
- CRM_Core_DAO::$_nullArray,
'civicrm_participant',
$participants[0]->id,
'Participant'