Skip to content

Commit

Permalink
[REF] Simplify a couple of variables
Browse files Browse the repository at this point in the history
Rather than rely on these being passed around retrieve them with
a consistent function.

Note tax_amount is retrieved one other place but that is fixed in
civicrm#19757

Line item will be used less once
civicrm#19801 is merged
  • Loading branch information
eileenmcnaughton committed Mar 22, 2021
1 parent 07678e0 commit eb5a5da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CRM/Member/Form/Membership.php
Original file line number Diff line number Diff line change
Expand Up @@ -1219,14 +1219,14 @@ public function submit(): void {
$paymentParams,
[
'contact_id' => $this->_contributorContactID,
'line_item' => $lineItem,
'line_item' => [$this->order->getPriceSetID() => $this->order->getLineItems()],
'is_test' => $this->isTest(),
'campaign_id' => $paymentParams['campaign_id'] ?? NULL,
'source' => CRM_Utils_Array::value('source', $paymentParams, CRM_Utils_Array::value('description', $paymentParams)),
'payment_instrument_id' => $this->getPaymentInstrumentID(),
'financial_type_id' => $this->getFinancialTypeID(),
'receive_date' => CRM_Utils_Time::date('YmdHis'),
'tax_amount' => $params['tax_amount'] ?? NULL,
'tax_amount' => $this->order->getTotalTaxAmount(),
'total_amount' => $this->order->getTotalAmount(),
'invoice_id' => $this->getInvoiceID(),
'currency' => $this->getCurrency(),
Expand Down

0 comments on commit eb5a5da

Please sign in to comment.