From: colemanw Date: Thu, 8 Apr 2021 22:15:06 +0000 (-0400) Subject: Merge pull request #19902 from eileenmcnaughton/mem_cont X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3f979abc8de69d6886d2171df09d96fcb07621cb;p=civicrm-core.git Merge pull request #19902 from eileenmcnaughton/mem_cont [REF] [Towards membership api] Simplify determination on contribution recur contact id --- 3f979abc8de69d6886d2171df09d96fcb07621cb diff --cc CRM/Member/Form/Membership.php index 558245a111,d6779d6de4..c435bde729 --- a/CRM/Member/Form/Membership.php +++ b/CRM/Member/Form/Membership.php @@@ -1702,12 -1789,12 +1700,12 @@@ DESC limit 1") 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();