unset($membershipParams['is_recur']);
}
[$membershipContribution, $secondPaymentResult] = $this->processSecondaryFinancialTransaction($contactID, array_merge($membershipParams, ['skipLineItem' => 1]),
- $isTest, $unprocessedLineItems, $membershipDetails['minimum_fee'] ?? 0, $membershipDetails['financial_type_id'] ?? NULL);
+ $isTest, $membershipDetails['minimum_fee'] ?? 0, $membershipDetails['financial_type_id'] ?? NULL);
$paymentResults[] = ['contribution_id' => $membershipContribution->id, 'result' => $secondPaymentResult];
$totalAmount = $membershipContribution->total_amount;
}
* @param int $contactID
* @param array $tempParams
* @param bool $isTest
- * @param array $lineItems
* @param $minimumFee
* @param int $financialTypeID
*
* @throws \CRM_Core_Exception
* @throws \Civi\Payment\Exception\PaymentProcessorException
*/
- private function processSecondaryFinancialTransaction($contactID, $tempParams, $isTest, $lineItems, $minimumFee,
+ private function processSecondaryFinancialTransaction($contactID, $tempParams, $isTest, $minimumFee,
$financialTypeID): array {
$financialType = new CRM_Financial_DAO_FinancialType();
$financialType->id = $financialTypeID;
$this->_params['separate_membership_payment'] = 1;
$contributionParams = [
'contact_id' => $contactID,
- 'line_item' => $lineItems,
+ 'line_item' => [$this->getPriceSetID() => $this->getSecondaryMembershipContributionLineItems()],
'is_test' => $isTest,
'campaign_id' => $tempParams['campaign_id'] ?? $this->_values['campaign_id'] ?? NULL,
'contribution_page_id' => $this->_id,