-
- Downloads
Simplify parameters passed to completeOrder
Now that completeOrder has had most interaction with objects var cleaned up we know only 2 objects are actually used - contribution - which we can fetch in-function - paymentProcessor - which we were actually only guessing This alters it to only load & pass contribution. The value of passing in processor seems lost in time. This code can only be reached for pay_later contributions - see CRM_Contribute_BAO_Contribution::checkOnlinePendingContribution and specifically https://github.com/civicrm/civicrm-core/blob/318c63045e82d30ed7fe8cdacb91a6d31fc5331b/CRM/Contribute/BAO/Contribution.php#L2033 and only when submitted via an online event (same function) so by definition there IS NO PAYMENT PROCESSOR that applies. Given that we can just do the minimum to load the contribution and pass that in.
Please register or sign in to comment