Use saved contribution's line items rather than the primaryContributionID
authoreileen <emcnaughton@wikimedia.org>
Sat, 1 Aug 2020 21:58:39 +0000 (09:58 +1200)
committereileen <emcnaughton@wikimedia.org>
Sun, 2 Aug 2020 10:15:17 +0000 (22:15 +1200)
commit7e9abd5a2bdadc458ac8a980cd2e72baec7a9c7c
tree3ed92a670cb0209f4992e4f745875bd406c8ec86
parentddaa955ed4b89d8d3280316a7c902357a6e03793
Use saved contribution's line items rather than the primaryContributionID

By the time we reach this point in the code we know that
1) the contributon exists and it has an id
2) it has line items  - either those created in it's pending stage or those calculated in repeattransaction

Therefore we can reasonably assume these line items are accurate now and use them, rather than the confusing
primaryContributionID that we have doubts about the validity of
CRM/Contribute/BAO/Contribution.php
tests/phpunit/api/v3/ContributionTest.php