Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove call to loadRelatedObjects from completetransaction #24087

Merged
merged 3 commits into from
Aug 2, 2022

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Remove call to loadRelatedObjects from completetransaction

Before

Legacy cruft call loadRelatedObjects sometimes causes notices

After

poof

Technical Details

This call is has been removed from the other places (Paypal & Authorize.net) that call completeOrder. The values it loads are no longer passed in/ used

The only one that is a bit confusing is amount - this is actually a copy & paste legacy from when the coede was shared with repeattransaction which DOES accept amount as an input. completeOrder, however, does not allow amount to be changed.

Comments

@mattwire - I fixed up some tests to have better data but now they are hitting the e-notice so it feels like a good time to finally rip out this bit of code - the last round (or the one before) of cleanup in completeOrder made it obsolete

@civibot
Copy link

civibot bot commented Jul 29, 2022

(Standard links)

@civibot civibot bot added the master label Jul 29, 2022
@@ -3304,7 +3304,7 @@ public function testCompleteTransactionSetStatusToInProgress($dataSet) {
])
);
$this->callAPISuccess('Contribution', 'completetransaction', [
'id' => $contribution,
'id' => $contribution['id'],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm - this was always wrong - must have been cast to 1 before....

@mattwire
Copy link
Contributor

mattwire commented Aug 2, 2022

tests passing

@mattwire mattwire merged commit 9eee2fe into civicrm:master Aug 2, 2022
@eileenmcnaughton eileenmcnaughton deleted the complete branch August 2, 2022 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants