public $useLivePageJS = TRUE;
/**
- * The values for the contribution db object
+ * The values for the contribution db object.
*
* @var array
*/
public $_values;
/**
- * The values for the quickconfig for priceset
+ * The values for the quickconfig for priceset.
*
* @var boolean
*/
public $_priceSetId;
/**
- * Array of fields for the price set
+ * Array of fields for the price set.
*
* @var array
*/
public $_priceSet;
/**
- * The id of the participation that we are proceessing
+ * The id of the participation that we are proceessing.
*
* @var int
*/
public $_id;
/**
- * The id of the note
+ * The id of the note.
*
* @var int
*/
protected $_noteId = NULL;
/**
- * The id of the contact associated with this participation
+ * The id of the contact associated with this participation.
*
* @var int
*/
public $_contactId;
/**
- * Array of event values
+ * Array of event values.
*
* @var array
*/
public $_single = FALSE;
/**
- * If event is paid or unpaid
+ * If event is paid or unpaid.
*/
public $_isPaidEvent;
/**
- * Page action
+ * Page action.
*/
public $_action;
/**
- * Role Id
+ * Role Id.
*/
protected $_roleId = NULL;
/**
- * Event Type Id
+ * Event Type Id.
*/
protected $_eventTypeId = NULL;
/**
- * Participant status Id
+ * Participant status Id.
*/
protected $_statusId = NULL;
/**
- * Cache all the participant statuses
+ * Cache all the participant statuses.
*/
protected $_participantStatuses;
/**
- * Participant mode
+ * Participant mode.
*/
public $_mode = NULL;
/**
- * Event ID preselect
+ * Event ID preselect.
*/
public $_eID = NULL;
/**
- * Line Item for Price Set
+ * Line Item for Price Set.
*/
public $_lineItem = NULL;
/**
- * Contribution mode for event registration for offline mode
+ * Contribution mode for event registration for offline mode.
*/
public $_contributeMode = 'direct';
protected $_eventNameCustomDataTypeID;
/**
- * Selected discount id
+ * Selected discount id.
*/
public $_originalDiscountId = NULL;
/**
- * Event id
+ * Event id.
*/
public $_eventId = NULL;
public $_onlinePendingContributionId = NULL;
/**
- * Set variables up before form is built
+ * Set variables up before form is built.
*
* @return void
*/
}
}
- list($defaults[$this->_id]['register_date'],
- $defaults[$this->_id]['register_date_time']
- ) = CRM_Utils_Date::setDateDefaults(
- CRM_Utils_Array::value('register_date', $defaults[$this->_id]), 'activityDateTime'
- );
+ list($defaults[$this->_id]['register_date'], $defaults[$this->_id]['register_date_time'])
+ = CRM_Utils_Date::setDateDefaults(CRM_Utils_Array::value('register_date', $defaults[$this->_id]), 'activityDateTime');
//assign event and role id, this is needed for Custom data building
$sep = CRM_Core_DAO::VALUE_SEPARATOR;
}
/**
- * Build the form object
+ * Build the form object.
*
* @return void
*/
}
/**
- * Add local and global form rules
+ * Add local and global form rules.
*
*
* @return void
}
/**
- * Global validation rules for the form
+ * Global validation rules for the form.
*
* @param array $values
* Posted values of the form.
$errorMsg = array();
if (!empty($values['payment_processor_id'])) {
- // make sure that credit card number and cvv are valid
- CRM_Core_Payment_Form::validateCreditCard($values, $errorMsg);
+ // make sure that payment instrument values (e.g. credit card number and cvv) are valid
+ CRM_Core_Payment_Form::validatePaymentInstrument($values['payment_processor_id'], $values, $errorMsg, $self);
}
if (!empty($values['record_contribution'])) {
}
/**
- * Process the form submission
+ * Process the form submission.
*/
public function postProcess() {
// get the submitted form values.