Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mjwshared
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Extensions
mjwshared
Commits
6f31d6bc
Commit
6f31d6bc
authored
3 years ago
by
Rich
Committed by
mattwire
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Implement processWebhookEvent
parent
e05a9bd8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!26
Proposal for widening use case to GoCardless (and others)
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
api/v3/Job/ProcessPaymentprocessorWebhooks.php
+9
-1
9 additions, 1 deletion
api/v3/Job/ProcessPaymentprocessorWebhooks.php
api/v3/Mjwpayment/Notificationretry.php
+1
-1
1 addition, 1 deletion
api/v3/Mjwpayment/Notificationretry.php
with
10 additions
and
2 deletions
api/v3/Job/ProcessPaymentprocessorWebhooks.php
+
9
−
1
View file @
6f31d6bc
...
...
@@ -55,7 +55,13 @@ function civicrm_api3_job_process_paymentprocessor_webhooks($params) {
foreach
(
$paymentProcessorWebhooks
as
$webhook
)
{
$paymentProcessor
=
\Civi\Payment\System
::
singleton
()
->
getById
(
$webhook
[
'payment_processor_id'
]);
switch
(
$paymentProcessor
->
getPaymentProcessor
()[
'class_name'
])
{
if
(
method_exists
(
'processWebhookEvent'
,
$paymentProcessor
))
{
$paymentProcessor
->
processWebhookEvent
(
$webhook
);
}
else
{
// Legacy support.
switch
(
$paymentProcessor
->
getPaymentProcessor
()[
'class_name'
])
{
case
'Payment_Stripe'
:
try
{
$results
[
$webhook
[
'id'
]]
=
civicrm_api3
(
'Stripe'
,
'Ipn'
,
[
...
...
@@ -72,6 +78,8 @@ function civicrm_api3_job_process_paymentprocessor_webhooks($params) {
->
execute
();
}
break
;
}
}
}
...
...
This diff is collapsed.
Click to expand it.
api/v3/Mjwpayment/Notificationretry.php
+
1
−
1
View file @
6f31d6bc
...
...
@@ -22,7 +22,7 @@ function _civicrm_api3_mjwpayment_notificationretry_spec(&$params) {
*/
function
civicrm_api3_mjwpayment_notificationretry
(
$params
)
{
if
(
!
empty
(
$params
[
'system_log_id'
]))
{
// lets replace params with this rather than allow altering
// let
'
s replace params with this rather than allow altering
$logEntry
=
civicrm_api3
(
'system_log'
,
'getsingle'
,
[
'id'
=>
$params
[
'system_log_id'
],
'return'
=>
[
'context'
,
'message'
]]);
}
$dataRaw
=
$logEntry
[
'context'
];
...
...
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