$this->_fields = $this->get('fields');
$this->_bltID = $this->get('bltID');
$this->_paymentProcessor = $this->get('paymentProcessor');
- if (!$this->_paymentProcessor) {
- $this->_paymentProcessor = array('object' => Civi\Payment\System::singleton()->getById(0));
- }
+
$this->_priceSetId = $this->get('priceSetId');
$this->_priceSet = $this->get('priceSet');
// The concept of contributeMode is deprecated.
// The payment processor object can provide info about the fields it shows.
- if ($isMonetary) {
+ if ($isMonetary && is_a($this->_paymentProcessor['object'], 'CRM_Core_Payment')) {
/** @var $paymentProcessorObject \CRM_Core_Payment */
$paymentProcessorObject = $this->_paymentProcessor['object'];
+
$paymentFields = $paymentProcessorObject->getPaymentFormFields();
foreach ($paymentFields as $index => $paymentField) {
if (!isset($this->_params[$paymentField])) {