Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
justinfreeman (Agileware)
Core
Commits
43d1ae00
Commit
43d1ae00
authored
11 years ago
by
eileen
Browse files
Options
Downloads
Patches
Plain Diff
CRM-14396 - add module extension support to handlePaymentNotification
parent
ac30fed8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Core/Payment.php
+11
-8
11 additions, 8 deletions
CRM/Core/Payment.php
with
11 additions
and
8 deletions
CRM/Core/Payment.php
+
11
−
8
View file @
43d1ae00
...
...
@@ -204,7 +204,9 @@ abstract class CRM_Core_Payment {
}
/**
* Payment callback handler
* Payment callback handler. The processor_name or processor_id is passed in.
* Note that processor_id is more reliable as one site may have more than one instance of a
* processor & ideally the processor will be validating the results
* Load requested payment processor and call that processor's handle<$method> method
*
* @public
...
...
@@ -258,10 +260,11 @@ abstract class CRM_Core_Payment {
require_once
$ext
->
classToPath
(
$paymentClass
);
}
else
{
// Legacy instance - but there may also be an extension instance, so
// continue on to the next instance and check that one. We'll raise an
// error later on if none are found.
continue
;
// Legacy or extension as module instance
if
(
empty
(
$paymentClass
))
{
$paymentClass
=
'CRM_Core_'
.
$dao
->
class_name
;
}
}
$paymentProcessor
=
CRM_Financial_BAO_PaymentProcessor
::
getPayment
(
$dao
->
processor_id
,
$mode
);
...
...
@@ -278,9 +281,9 @@ abstract class CRM_Core_Payment {
if
(
!
method_exists
(
$processorInstance
,
$method
)
||
!
is_callable
(
array
(
$processorInstance
,
$method
))
)
{
//
No? This will b
e the
cas
e i
n
a
ll instances, so let's just die now
//
and not prolong the agony.
CRM_Core_Error
::
fatal
(
"Payment processor does not implement a '
$method
' method"
)
;
//
on the off chanc
e the
r
e i
s
a
double implementation of this processor we should keep looking for another
//
note that passing processor_id is more reliable & we should work to deprecate processor_name
continue
;
}
// Everything, it seems, is ok - execute pp callback handler
...
...
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