*
* @throws \CRM_Core_Exception
*/
- protected function getDefaultPaymentInstrumentId() {
+ protected function getDefaultPaymentInstrumentId(): int {
$paymentInstrumentID = CRM_Utils_Request::retrieve('payment_instrument_id', 'Integer');
return (int) ($paymentInstrumentID ?? $this->_paymentProcessor['payment_instrument_id']);
}
*/
protected $previousContributionStatus;
+
+ /**
+ * Payment Instrument ID
+ *
+ * @var int
+ */
+ public $payment_instrument_id;
+
/**
* Explicitly declare the form context.
*/
$paneNames[ts('Premium Information')] = 'Premium';
}
- $this->payment_instrument_id = CRM_Utils_Array::value('payment_instrument_id', $defaults, $this->getDefaultPaymentInstrumentId());
+ $this->payment_instrument_id = $defaults['payment_instrument_id'] ?? $this->getDefaultPaymentInstrumentId();
CRM_Core_Payment_Form::buildPaymentForm($this, $this->_paymentProcessor, FALSE, TRUE, $this->payment_instrument_id);
if (!empty($this->_recurPaymentProcessors)) {
$buildRecurBlock = TRUE;