Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stripe
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
Container registry
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
Stripe
Commits
74449047
Commit
74449047
authored
3 years ago
by
mattwire
Browse files
Options
Downloads
Patches
Plain Diff
Fix getSubscriptionDetails when contributionRecur not in CiviCRM
parent
0a7ee88b
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!176
Release 6.7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Core/Payment/StripeIPN.php
+9
-10
9 additions, 10 deletions
CRM/Core/Payment/StripeIPN.php
with
9 additions
and
10 deletions
CRM/Core/Payment/StripeIPN.php
+
9
−
10
View file @
74449047
...
...
@@ -9,6 +9,7 @@
+--------------------------------------------------------------------+
*/
use
Civi\Api4\ContributionRecur
;
use
Civi\Api4\PaymentprocessorWebhook
;
/**
...
...
@@ -657,22 +658,20 @@ class CRM_Core_Payment_StripeIPN {
}
// Get the recurring contribution record associated with the Stripe subscription.
try
{
$contributionRecur
=
\Civi\Api4\ContributionRecur
::
get
(
FALSE
)
->
addWhere
(
'trxn_id'
,
'='
,
$this
->
subscription_id
)
->
addWhere
(
'is_test'
,
'IN'
,
[
TRUE
,
FALSE
])
->
execute
()
->
first
();
$this
->
contribution_recur_id
=
$contributionRecur
[
'id'
];
$this
->
contributionRecur
=
$contributionRecur
;
}
catch
(
Exception
$e
)
{
$contributionRecur
=
ContributionRecur
::
get
(
FALSE
)
->
addWhere
(
'trxn_id'
,
'='
,
$this
->
subscription_id
)
->
addWhere
(
'is_test'
,
'IN'
,
[
TRUE
,
FALSE
])
->
execute
()
->
first
();
if
(
empty
(
$contributionRecur
))
{
if
((
bool
)
\Civi
::
settings
()
->
get
(
'stripe_ipndebug'
))
{
$message
=
$this
->
_paymentProcessor
->
getPaymentProcessorLabel
()
.
': '
.
$this
->
getEventID
()
.
': Cannot find recurring contribution for subscription ID: '
.
$this
->
subscription_id
;
Civi
::
log
()
->
debug
(
$message
);
}
return
FALSE
;
}
$this
->
contribution_recur_id
=
$contributionRecur
[
'id'
];
$this
->
contributionRecur
=
$contributionRecur
;
return
TRUE
;
}
...
...
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