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 inappropriate exception handling. #13442

Merged
merged 1 commit into from
Jan 16, 2019

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Jan 13, 2019

Overview

Remove exception when a payment is recorded through the api and the contribution is not partially paid or pending + pay later

Before

Exception thrown - e.g when adding a payment to a completed contribution

After

Exception not thrown. This check is removed on the basis that the rule is outdated and too narrow

Technical Details

Per discussion in 570243c#r31805899

the core logic has been changed to now accept a payment regardless of contribution status. This reflects the
fact that a payment could be received for a fully paid contribution and we still need to record it.

This exception is inappropriately narrow (& likely in the wrong place since it should probably be closer to
where the decision is made about adding a payment rather than when it is being processed

Comments

@JoeMurray this follows on on our discussion - note that this change looks big because the 'else' got removed - requiring a big whitespace change but this really is just the removal of the exception in line 4501 - https://github.com/civicrm/civicrm-core/pull/13442/files?w=1 for without whitespace

@civibot
Copy link

civibot bot commented Jan 13, 2019

(Standard links)

@civibot civibot bot added the master label Jan 13, 2019
@seamuslee001
Copy link
Contributor

@eileenmcnaughton this needs a rebase now

Per discussion in civicrm@570243c#r31805899

the core logic has been changed to now accept a payment regardless of contribution status. This reflects the
fact that a payment could be received for a fully paid contribution and we still need to record it.

This exception is inappropriately narrow (& likely in the wrong place since it should probably be closer to
where the decision is made about adding a payment rather than when it is being processed
@eileenmcnaughton
Copy link
Contributor Author

done

@eileenmcnaughton
Copy link
Contributor Author

@JoeMurray @monishdeb can we merge this per previous discussions?

@JoeMurray
Copy link
Contributor

I agree with the objective and approach in the code. I imagine @lcdservices does as well. @Monish?

@lcdservices
Copy link
Contributor

I definitely concur.

@monishdeb
Copy link
Member

I agree with this patch about removing that exception. Based on @lcdservices @JoeMurray my review I am merging it now.

@monishdeb monishdeb merged commit 2b491b3 into civicrm:master Jan 16, 2019
@eileenmcnaughton
Copy link
Contributor Author

thanks @monishdeb

@eileenmcnaughton eileenmcnaughton deleted the paymen_line branch January 16, 2019 04:30
@magnolia61
Copy link
Contributor

Just a quick question: would this also allow for payments against failed contributions? If so I would gladly welcome this change as well.

@eileenmcnaughton
Copy link
Contributor Author

@magnolia61 good question! I guess it stops it from being blocked at one place in the code - it depends if that is the place blocking it in your flow

@magnolia61
Copy link
Contributor

@eileenmcnaughton I was thinking about also enabling a Pay Now button for failed contributions from the user dashboard. I will keep it in mind for the partial payment / Pay Now issue #12319

@eileenmcnaughton
Copy link
Contributor Author

@magnolia61 so this change DID come off changes @jitendrapurohit proposed for that issue - I just wasn't prepared to see so many changes at once & am working through his changes

@jitendrapurohit
Copy link
Contributor

Many thanks for splitting the changes into these separate PRs @eileenmcnaughton. Thank you :-)

@eileenmcnaughton
Copy link
Contributor Author

@jitendrapurohit I know it's kinda messing with you since your code is going stale but I also can't cope with so much change in one PR. The question I really want to resolve next is about what combo of messages going out we should support from Payment api - ie. Payment.confirmation & Contribution.confirmation when completing - there is discussion on it ... somewhere else

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.

7 participants