*/
public $paymentInstrumentID;
+ /**
+ * Is the price set quick config.
+ * @return bool
+ */
+ public function isQuickConfig() {
+ return isset(self::$_quickConfig) ? self::$_quickConfig : FALSE;
+ }
+
/**
* Set variables up before form is built.
*
CRM_Utils_System::mungeCreditCard(CRM_Utils_Array::value('credit_card_number', $this->_params))
);
}
+ elseif ($paymentField === 'credit_card_type') {
+ $this->assign('credit_card_type', CRM_Core_PseudoConstant::getLabel(
+ 'CRM_Core_BAO_FinancialTrxn',
+ 'card_type_id',
+ CRM_Core_PseudoConstant::getKey('CRM_Core_BAO_FinancialTrxn', 'card_type_id', $this->_params['credit_card_type'])
+ ));
+ }
else {
$this->assign($paymentField, $this->_params[$paymentField]);
}
}
- $paymentFieldsetLabel = ts('%1 Information', array($paymentProcessorObject->getPaymentTypeLabel()));
- if (empty($paymentFields)) {
- $paymentFieldsetLabel = '';
- }
- $this->assign('paymentFieldsetLabel', $paymentFieldsetLabel);
+ $this->assign('paymentFieldsetLabel', CRM_Core_Payment_Form::getPaymentLabel($paymentProcessorObject));
$this->assign('paymentFields', $paymentFields);
}
}
if ($addCaptcha && !$viewOnly) {
- $captcha = CRM_Utils_ReCAPTCHA::singleton();
- $captcha->add($this);
- $this->assign('isCaptcha', TRUE);
+ $this->enableCaptchaOnForm();
}
}
}
}
+ /**
+ * Enable ReCAPTCHA on Contribution form
+ */
+ protected function enableCaptchaOnForm() {
+ $captcha = CRM_Utils_ReCAPTCHA::singleton();
+ if ($captcha->hasSettingsAvailable()) {
+ $captcha->add($this);
+ $this->assign('isCaptcha', TRUE);
+ }
+ }
+
+ /**
+ * Display ReCAPTCHA warning on Contribution form
+ */
+ protected function displayCaptchaWarning() {
+ if (CRM_Core_Permission::check("administer CiviCRM")) {
+ $captcha = CRM_Utils_ReCAPTCHA::singleton();
+ if (!$captcha->hasSettingsAvailable()) {
+ $this->assign('displayCaptchaWarning', TRUE);
+ }
+ }
+ }
+
+ /**
+ * Check if ReCAPTCHA has to be added on Contribution form forcefully.
+ */
+ protected function hasToAddForcefully() {
+ $captcha = CRM_Utils_ReCAPTCHA::singleton();
+ return $captcha->hasToAddForcefully();
+ }
+
/**
* Add onbehalf/honoree profile fields and native module fields.
*