if (!$this->isCreateRecurringContribution()) {
return NULL;
}
- $recurParams = ['contact_id' => $contactID];
+ $recurParams = ['contact_id' => $this->getContributionContactID()];
$recurParams['amount'] = $this->order->getTotalAmount();
- $recurParams['auto_renew'] = $params['auto_renew'] ?? NULL;
- $recurParams['frequency_unit'] = $params['frequency_unit'] ?? NULL;
- $recurParams['frequency_interval'] = $params['frequency_interval'] ?? NULL;
- $recurParams['installments'] = $params['installments'] ?? NULL;
+ // for the legacyProcessRecurringContribution function to be reached auto_renew must be true
+ $recurParams['auto_renew'] = TRUE;
+ $recurParams['frequency_unit'] = $this->getFrequencyUnit();
+ $recurParams['frequency_interval'] = $this->getFrequencyInterval();
$recurParams['financial_type_id'] = $this->getFinancialTypeID();
$recurParams['currency'] = $this->getCurrency();
$recurParams['payment_instrument_id'] = $this->getPaymentInstrumentID();