// also check for billing informatin
// get the billing location type
- $locationTypes = CRM_Core_PseudoConstant::locationType();
+ $locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id');
// CRM-8108 remove ts around Billing location type
//$this->_bltID = array_search( ts('Billing'), $locationTypes );
$this->_bltID = array_search('Billing', $locationTypes);
// get price info
// CRM-5095
- CRM_Price_BAO_Set::initSet($this, $this->_id, 'civicrm_contribution_page');
+ CRM_Price_BAO_PriceSet::initSet($this, $this->_id, 'civicrm_contribution_page');
// this avoids getting E_NOTICE errors in php
$setNullFields = array(
$config = CRM_Core_Config::singleton();
if (isset($this->_values['is_recur']) &&
- $this->_paymentProcessor['is_recur']
+ CRM_Utils_Array::value('is_recur', $this->_paymentProcessor)
) {
$this->assign('is_recur_enabled', 1);
$vars = array_merge($vars, array(
}
foreach ($vars as $v) {
- if (CRM_Utils_Array::value($v, $this->_params)) {
+ if (isset($this->_params[$v])) {
if ($v == 'frequency_unit' || $v == 'pledge_frequency_unit') {
$frequencyUnits = CRM_Core_OptionGroup::values('recur_frequency_units');
if (array_key_exists($this->_params[$v], $frequencyUnits)) {
$this->_params[$v] = $frequencyUnits[$this->_params[$v]];
}
}
+ if ($v == "amount") {
+ $this->_params[$v] = CRM_Utils_Money::format($this->_params[$v], ' ');
+ }
$this->assign($v, $this->_params[$v]);
}
}
}
if ($this->_contributeMode == 'direct' && $assignCCInfo) {
- if ($this->_paymentProcessor['payment_type'] & CRM_Core_Payment::PAYMENT_TYPE_DIRECT_DEBIT) {
+ if ($this->_paymentProcessor &&
+ $this->_paymentProcessor['payment_type'] & CRM_Core_Payment::PAYMENT_TYPE_DIRECT_DEBIT
+ ) {
$this->assign('payment_type', $this->_paymentProcessor['payment_type']);
$this->assign('account_holder', $this->_params['account_holder']);
$this->assign('bank_identification_number', $this->_params['bank_identification_number']);
);
$this->_fields[$key] = $field;
}
- if ($field['add_captcha']) {
+ // CRM-11316 Is ReCAPTCHA enabled for this profile AND is this an anonymous visitor
+ if ($field['add_captcha'] && !$this->_userID) {
$addCaptcha = TRUE;
}
}