Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
911365c8
Unverified
Commit
911365c8
authored
4 years ago
by
Seamus Lee
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #17499 from eileenmcnaughton/unhandled
[Ref] Remove calls to, and deprecate, unhandled function
parents
f08e7a44
85ce114d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CRM/Core/Payment/BaseIPN.php
+5
-2
5 additions, 2 deletions
CRM/Core/Payment/BaseIPN.php
CRM/Core/Payment/PayPalIPN.php
+4
-3
4 additions, 3 deletions
CRM/Core/Payment/PayPalIPN.php
CRM/Core/Payment/PayPalProIPN.php
+3
-3
3 additions, 3 deletions
CRM/Core/Payment/PayPalProIPN.php
with
12 additions
and
8 deletions
CRM/Core/Payment/BaseIPN.php
+
5
−
2
View file @
911365c8
...
...
@@ -361,15 +361,18 @@ class CRM_Core_Payment_BaseIPN {
/**
* Rollback unhandled outcomes.
*
* @deprecated
*
* @param array $objects
* @param CRM_Core_Transaction $transaction
*
* @return bool
*/
public
function
unhandled
(
&
$objects
,
&
$transaction
)
{
CRM_Core_Error
::
deprecatedFunctionWarning
(
'This function will be removed at some point'
);
$transaction
->
rollback
();
Civi
::
log
()
->
debug
(
"
Returning since contribution status is not handled
"
);
echo
"
Failure: contribution status is not handled<p>
"
;
Civi
::
log
()
->
debug
(
'
Returning since contribution status is not handled
'
);
echo
'
Failure: contribution status is not handled<p>
'
;
return
FALSE
;
}
...
...
This diff is collapsed.
Click to expand it.
CRM/Core/Payment/PayPalIPN.php
+
4
−
3
View file @
911365c8
...
...
@@ -270,8 +270,9 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN {
elseif
(
$status
==
'Refunded'
||
$status
==
'Reversed'
)
{
return
$this
->
cancelled
(
$objects
,
$transaction
);
}
elseif
(
$status
!=
'Completed'
)
{
return
$this
->
unhandled
(
$objects
,
$transaction
);
elseif
(
$status
!==
'Completed'
)
{
Civi
::
log
()
->
debug
(
'Returning since contribution status is not handled'
);
return
;
}
// check if contribution is already completed, if so we ignore this ipn
...
...
@@ -279,7 +280,7 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN {
if
(
$contribution
->
contribution_status_id
==
$completedStatusId
)
{
$transaction
->
commit
();
Civi
::
log
()
->
debug
(
'PayPalIPN: Returning since contribution has already been handled. (ID: '
.
$contribution
->
id
.
').'
);
echo
"
Success: Contribution has already been handled<p>
"
;
echo
'
Success: Contribution has already been handled<p>
'
;
return
;
}
...
...
This diff is collapsed.
Click to expand it.
CRM/Core/Payment/PayPalProIPN.php
+
3
−
3
View file @
911365c8
...
...
@@ -359,8 +359,8 @@ class CRM_Core_Payment_PayPalProIPN extends CRM_Core_Payment_BaseIPN {
$this
->
cancelled
(
$objects
,
$transaction
);
return
;
}
elseif
(
$status
!=
'Completed'
)
{
$this
->
unhandled
(
$objects
,
$transaction
);
elseif
(
$status
!=
=
'Completed'
)
{
Civi
::
log
()
->
debug
(
'Returning since contribution status is not handled'
);
return
;
}
...
...
@@ -369,7 +369,7 @@ class CRM_Core_Payment_PayPalProIPN extends CRM_Core_Payment_BaseIPN {
if
(
$contribution
->
contribution_status_id
==
$completedStatusId
)
{
$transaction
->
commit
();
Civi
::
log
()
->
debug
(
'PayPalProIPN: Returning since contribution has already been handled.'
);
echo
"
Success: Contribution has already been handled<p>
"
;
echo
'
Success: Contribution has already been handled<p>
'
;
return
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment