);
}
else {
+ // The concept of contributeMode is deprecated.
+ // the is_monetary concept probably should be too as it can be calculated from
+ // the existence of 'amount' & seems fragile.
if ($this->_contributeMode == 'notify' || !$this->_values['is_monetary'] ||
$this->_amount <= 0.0 || $this->_params['is_pay_later'] ||
($this->_separateMembershipPayment && $this->_amount <= 0.0)
if (isset($membershipContributionID)) {
$form->_values['contribution_id'] = $membershipContributionID;
}
+ // The concept of contributeMode is deprecated.
+ // the is_monetary concept probably should be too as it can be calculated from
+ // the existence of 'amount' & seems fragile.
if ($form->_contributeMode) {
if ($form->_values['is_monetary'] && $form->_amount > 0.0 && !$form->_params['is_pay_later']) {
// call postProcess hook before leaving
* We are moving towards always creating as pending and updating at the end (based on payment), so this should be
* an interim refactoring. It was shared with another unrelated form & some parameters may not apply to this form.
*
- *
* @return bool
*/
protected function getIsPending() {
+ // The concept of contributeMode is deprecated.
+ // the is_monetary concept probably should be too as it can be calculated from
+ // the existence of 'amount' & seems fragile.
if (((isset($this->_contributeMode)) || !empty
($this->_params['is_pay_later'])
) &&
$form->_paymentProcessor = civicrm_api3('payment_processor', 'getsingle', array(
'id' => $params['payment_processor_id'],
));
+ // The concept of contributeMode is deprecated as is the billing_mode concept.
if ($form->_paymentProcessor['billing_mode'] == 1) {
$form->_contributeMode = 'direct';
}
!empty($this->_paymentProcessor) &&
((float ) $params['amount'] > 0.0 || $memFee > 0.0)
) {
+ // The concept of contributeMode is deprecated - as should be the 'is_monetary' setting.
$this->setContributeMode();
// Really this setting of $this->_params & params within it should be done earlier on in the function
// probably the values determined here should be reused in confirm postProcess as there is no opportunity to alter anything
*/
public $_useForMember;
+ /**
+ * @deprecated
+ *
+ * @var
+ */
public $_isBillingAddressRequiredForPayLater;
/**
}
}
+ // The concept of contributeMode is deprecated.
+ // The payment processor object can provide info about the fields it shows.
if ($this->_contributeMode == 'direct' && $assignCCInfo) {
if ($this->_paymentProcessor &&
$this->_paymentProcessor['payment_type'] & CRM_Core_Payment::PAYMENT_TYPE_DIRECT_DEBIT
'email' => $email,
'confirm_email_text' => CRM_Utils_Array::value('confirm_email_text', $values['event']),
'isShowLocation' => CRM_Utils_Array::value('is_show_location', $values['event']),
+ // The concept of contributeMode is deprecated.
'contributeMode' => CRM_Utils_Array::value('contributeMode', $template->_tpl_vars),
'participantID' => $participantId,
'conference_sessions' => $sessions,
// address required during receipt processing (pdf and email receipt)
if ($displayAddress = CRM_Utils_Array::value('address', $values)) {
$sendTemplateParams['tplParams']['address'] = $displayAddress;
+ // The concept of contributeMode is deprecated.
$sendTemplateParams['tplParams']['contributeMode'] = NULL;
}
// set lineItem details
if ($lineItem = CRM_Utils_Array::value('lineItem', $values)) {
- // check if additional prticipant, if so filter only to relevant ones
+ // check if additional participant, if so filter only to relevant ones
// CRM-9902
if (!empty($values['params']['additionalParticipant'])) {
$ownLineItems = array();
/**
* Contribution mode for event registration for offline mode.
+ *
+ * @deprecated
*/
public $_contributeMode = 'direct';
CRM_Utils_System::mungeCreditCard($params['credit_card_number'])
);
$this->assign('credit_card_type', $params['credit_card_type']);
+ // The concept of contributeMode is deprecated.
$this->assign('contributeMode', 'direct');
$this->assign('isAmountzero', 0);
$this->assign('is_pay_later', 0);
);
CRM_Utils_System::redirect($url);
}
+ // The concept of contributeMode is deprecated.
$this->_contributeMode = $this->get('contributeMode');
$this->assign('contributeMode', $this->_contributeMode);
$this->assign('address', CRM_Utils_Address::format($addressFields));
+ // The concept of contributeMode is deprecated.
if ($this->_contributeMode == 'direct' && empty($params['is_pay_later'])) {
$date = CRM_Utils_Date::format(CRM_Utils_Array::value('credit_card_exp_date', $params));
$date = CRM_Utils_Date::mysqlToIso($date);
}
//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('hookDiscount', $this->_params[0]['discount']);
}
+ // The concept of contributeMode is deprecated.
if ($this->_contributeMode == 'express') {
$params = array();
// rfp == redirect from paypal
if (!empty($value['is_pay_later']) ||
$value['amount'] == 0 ||
+ // The concept of contributeMode is deprecated.
$this->_contributeMode == 'checkout' ||
$this->_contributeMode == 'notify'
) {
}
// for Transfer checkout.
+ // The concept of contributeMode is deprecated.
if (($this->_contributeMode == 'checkout' ||
$this->_contributeMode == 'notify'
) && empty($params[0]['is_pay_later']) &&
}
//create an contribution address
+ // The concept of contributeMode is deprecated. Elsewhere we use the function processBillingAddress() - although
+ // currently that is only inherited by back-office forms.
if ($form->_contributeMode != 'notify' && empty($params['is_pay_later'])) {
$contribParams['address_id'] = CRM_Contribute_BAO_Contribution::createAddress($params, $form->_bltID);
}
/**
* Process the form submission.
- *
- *
- * @return void
*/
public function postProcess() {
// get the submitted form values.
) {
$this->handlePreApproval($params);
-
+ // The concept of contributeMode is deprecated - but still needs removal from the message templates.
$this->set('contributeMode', 'express');
// Send Event Name & Id in Params
elseif ($this->_paymentProcessor &&
$this->_paymentProcessor['billing_mode'] & CRM_Core_Payment::BILLING_MODE_NOTIFY
) {
+ // The concept of contributeMode is deprecated - but still needs removal from the message templates.
$this->set('contributeMode', 'notify');
}
}