-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
dev/financial#152 Clean up & test contributionPageID handling #18729
Conversation
(Standard links)
|
@@ -106,13 +107,6 @@ public function main($component = 'contribute') { | |||
$objects['contact'] = &$contact; | |||
$objects['contribution'] = &$contribution; | |||
|
|||
// CRM-19478: handle oddity when p=null is set in place of contribution page ID, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was copied onto this class as part of https://lab.civicrm.org/dev/financial/-/issues/148 but as noted there it never applied to A.net & was always gonna be short lived on this class - see https://issues.civicrm.org/jira/browse/CRM-19478 for background
@@ -321,12 +315,6 @@ public function getIDs(&$ids, &$input) { | |||
throw new CRM_Core_Exception($message); | |||
} | |||
|
|||
// get page id based on contribution id | |||
$ids['contributionPage'] = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_Contribution', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, do that - but not here as we have loaded it in line 80....
Looks fine to me merge on pass |
3b6e2a4
to
f6c0bee
Compare
Overview
Cleans up & adds tests for handling of
$ids['contributionPage']
in AuthorizeNetIPBefore
Paypal specific code adding confusion, contribution id being retrieved as a separate query in a separate place when we could just use the value when the bao is fetched
After
Handling simplified, test added.
Technical Details
The only use of loading it is that the authorize.net code later decides whether to send an email based on it. This is tested in the test that also now includes a check that it is copied over.
This is part of step 1 in https://lab.civicrm.org/dev/financial/-/issues/152 where the goal is to remove the use of the now irrelevant paymentProcessorID in
However, it seems loadObjects can likely be bypasses altogether so I'm clarifying how $ids & $objects are used - a larger clarification can be done after #18728 is merged
Comments