-
-
Notifications
You must be signed in to change notification settings - Fork 817
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
CRM-20800 fix fatal error up updating paypal contributions #10986
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,8 +81,10 @@ public function preProcess() { | |
|
||
$this->contributionRecurID = CRM_Utils_Request::retrieve('crid', 'Integer', $this, FALSE); | ||
if ($this->contributionRecurID) { | ||
$this->_paymentProcessor = CRM_Contribute_BAO_ContributionRecur::getPaymentProcessor($this->contributionRecurID); | ||
if (!$this->_paymentProcessor) { | ||
try { | ||
$this->_paymentProcessor = CRM_Financial_BAO_PaymentProcessor::getPaymentProcessorForRecurringContribution($this->contributionRecurID); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Had a hard time in replicating the issue, so I am relying on reporter's response :( |
||
} | ||
catch (CRM_Core_Exception $e) { | ||
CRM_Core_Error::statusBounce(ts('There is no valid processor for this subscription so it cannot be edited.')); | ||
} | ||
$this->_paymentProcessorObj = $this->_paymentProcessor['object']; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
actually it needs to be $this->_paymentProcessorObj = CRM_Financial_BAO_PaymentProcessor::getPaymentProcessorForRecurringContribution($this->contributionRecurID);
I think, but the issue is a bit more than this. I think it's about making it so a cancellation happens if UI changes (changing installment number, end_date) effectively cancel it. I think it might be easier to change installments on the form when end_date changes - or force user to & possibly move this to the ContributionRecur BAO
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.
Agree of what need to be addressed, I made the revert to fix a issue mentioned by reporter - https://issues.civicrm.org/jira/browse/CRM-20800?focusedCommentId=108162&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-108162
I though the same but then
$this->_paymentProcessor
will be set to NULL which later assigned at L140. Although I found no use of$this->_paymentProcessor
anywhere inUpdateSubscription
php or template, so we might need to keep any one form variable, that would be:$_paymentProcessorObject
to$_paymentProcessor
$_paymentProcessorObject