// we do not want to display recently viewed items on Registration pages
$this->assign('displayRecent', FALSE);
- // Registration page values are cleared from session, so can't use normal Printer Friendly view.
- // Use Browser Print instead.
- $this->assign('browserPrint', TRUE);
$isShowLocation = CRM_Utils_Array::value('is_show_location', $this->_values['event']);
$this->assign('isShowLocation', $isShowLocation);
* Handle process after the confirmation of payment by User.
*
* @param int $contactID
- * @param null $contribution
- * @param null $payment
+ * @param \CRM_Contribute_BAO_Contribution $contribution
*/
- public function confirmPostProcess($contactID = NULL, $contribution = NULL, $payment = NULL) {
+ public function confirmPostProcess($contactID = NULL, $contribution = NULL) {
// add/update contact information
- $fields = array();
unset($this->_params['note']);
//to avoid conflict overwrite $this->_params
// CRM-10032
$this->processFirstParticipant($participant->id);
}
+ $this->_params['participantID'] = $participant->id;
+ $this->set('primaryParticipant', $this->_params);
CRM_Core_BAO_CustomValueTable::postProcess($this->_params,
'civicrm_participant',
$paymentPartcipant = CRM_Event_BAO_ParticipantPayment::create($paymentParams);
}
- //set only primary participant's params for transfer checkout.
- // The concept of contributeMode is deprecated.
- if (($this->_contributeMode == 'checkout' || $this->_contributeMode == 'notify') && !empty($this->_params['is_primary'])) {
- $this->_params['participantID'] = $participant->id;
- $this->set('primaryParticipant', $this->_params);
- }
-
$this->assign('action', $this->_action);
// create CMS user
}
$this->set('value', $value);
- $this->confirmPostProcess($contactID, NULL, NULL);
+ $this->confirmPostProcess($contactID, NULL);
//lets get additional participant id to cancel.
if ($this->_allowConfirmation && is_array($cancelledIds)) {
$registerParams = $this->_params[0];
$registerParams = $this->prepareParamsForPaymentProcessor($registerParams);
- if (isset($registerParams['credit_card_exp_date'])) {
- $registerParams['year'] = CRM_Core_Payment_Form::getCreditCardExpirationYear($registerParams);
- $registerParams['month'] = CRM_Core_Payment_Form::getCreditCardExpirationMonth($registerParams);
- }
if ($this->_values['event']['is_monetary']) {
- $registerParams['ip_address'] = CRM_Utils_System::ipAddress();
$registerParams['currencyID'] = $this->_params[0]['currencyID'];
}
//assign back primary participant params.
$payment = $registerByID = $primaryCurrencyID = $contribution = NULL;
$paymentObjError = ts('The system did not record payment details for this payment and so could not process the transaction. Please report this error to the site administrator.');
- $this->participantIDS = [];
$fields = [];
foreach ($params as $key => $value) {
CRM_Event_Form_Registration_Confirm::fixLocationFields($value, $fields, $this);
}
$this->assign('register_date', $registerDate);
- $this->confirmPostProcess($contactID, $contribution, $payment);
+ $this->confirmPostProcess($contactID, $contribution);
}
//handle if no additional participant.
$isTest = TRUE;
}
+ $primaryParticipant = $this->get('primaryParticipant');
+
+ if (empty($primaryParticipant['participantID'])) {
+ CRM_Core_Error::deprecatedFunctionWarning('This line is not logically reachable.');
+ $primaryParticipant['participantID'] = $registerByID;
+ }
+ //otherwise send mail Confirmation/Receipt
+ $primaryContactId = $this->get('primaryContactId');
+
// for Transfer checkout.
// The concept of contributeMode is deprecated.
if (($this->_contributeMode == 'checkout' ||
$this->_totalAmount > 0
) {
- $primaryParticipant = $this->get('primaryParticipant');
-
- if (empty($primaryParticipant['participantID'])) {
- $primaryParticipant['participantID'] = $registerByID;
- }
-
//build an array of custom profile and assigning it to template
$customProfile = CRM_Event_BAO_Event::buildCustomProfile($registerByID, $this->_values, NULL, $isTest);
if (count($customProfile)) {
}
}
else {
- //otherwise send mail Confirmation/Receipt
- $primaryContactId = $this->get('primaryContactId');
//build an array of cId/pId of participants
$additionalIDs = CRM_Event_BAO_Event::buildCustomProfile($registerByID,
}
//get email primary first if exist
- $subscribtionEmail = ['email' => CRM_Utils_Array::value('email-Primary', $params)];
- if (!$subscribtionEmail['email']) {
- $subscribtionEmail['email'] = CRM_Utils_Array::value("email-{$form->_bltID}", $params);
+ $subscriptionEmail = ['email' => CRM_Utils_Array::value('email-Primary', $params)];
+ if (!$subscriptionEmail['email']) {
+ $subscriptionEmail['email'] = CRM_Utils_Array::value("email-{$form->_bltID}", $params);
}
// subscribing contact to groups
- if (!empty($subscribeGroupIds) && $subscribtionEmail['email']) {
- CRM_Mailing_Event_BAO_Subscribe::commonSubscribe($subscribeGroupIds, $subscribtionEmail, $contactID);
+ if (!empty($subscribeGroupIds) && $subscriptionEmail['email']) {
+ CRM_Mailing_Event_BAO_Subscribe::commonSubscribe($subscribeGroupIds, $subscriptionEmail, $contactID);
}
return $contactID;