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

[REF] Extract handling for loading contribution recur object. #18746

Merged
merged 1 commit into from
Oct 21, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

We actually load this multiple times.... This alters one of the retrievals to make it more re-usable
as a step towards consolidatio

Before

getContributionRecurObject inline in getIDs

After

extracted -

Technical Details

it now throws an exception when it fails validation & relies on top level try catch. It does log a little less info in that scenario but I think if that is an issue it would be better to revisit in the main try-catch

Comments

@civibot
Copy link

civibot bot commented Oct 12, 2020

(Standard links)

@civibot civibot bot added the master label Oct 12, 2020
We actually load this multiple times.... This alters one of the retrievals to make it more re-usable
and removes the duplicate validation
if (!$ids['contributionRecur']) {
$message = ts("Could not find contributionRecur id");
$log = new CRM_Utils_SystemLogger();
$log->error('payment_notification', ['message' => $message, 'ids' => $ids, 'input' => $input]);
Copy link
Contributor

Choose a reason for hiding this comment

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

is removing the additional debugging information an issue here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@seamuslee001 yeah - I commented on that in the pr template - I'm inclined to 'no' as I can't recall the last ticket referencing that output & if the answer were yes I think the catch would be a better place

@mattwire mattwire merged commit 41cf824 into civicrm:master Oct 21, 2020
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.

3 participants