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
52befd01
Commit
52befd01
authored
3 years ago
by
mattwire
Browse files
Options
Downloads
Patches
Plain Diff
Throw exception when repeatTransaction fails
parent
eccf41b3
No related branches found
Branches containing commit
No related tags found
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
+3
-8
3 additions, 8 deletions
CRM/Core/Payment/StripeIPN.php
with
3 additions
and
8 deletions
CRM/Core/Payment/StripeIPN.php
+
3
−
8
View file @
52befd01
...
@@ -375,9 +375,7 @@ class CRM_Core_Payment_StripeIPN {
...
@@ -375,9 +375,7 @@ class CRM_Core_Payment_StripeIPN {
return
TRUE
;
return
TRUE
;
}
}
else
{
else
{
if
(
!
$this
->
createNextContributionForRecur
())
{
$this
->
createNextContributionForRecur
();
return
FALSE
;
}
}
}
return
TRUE
;
return
TRUE
;
}
}
...
@@ -409,9 +407,7 @@ class CRM_Core_Payment_StripeIPN {
...
@@ -409,9 +407,7 @@ class CRM_Core_Payment_StripeIPN {
else
{
else
{
// We have a recurring contribution but have not yet received invoice.finalized so we don't have the next contribution yet.
// We have a recurring contribution but have not yet received invoice.finalized so we don't have the next contribution yet.
// invoice.payment_succeeded sometimes comes before invoice.finalized so trigger the same behaviour here to create a new contribution
// invoice.payment_succeeded sometimes comes before invoice.finalized so trigger the same behaviour here to create a new contribution
if
(
!
$this
->
createNextContributionForRecur
())
{
$this
->
createNextContributionForRecur
();
return
FALSE
;
}
// Now get the contribution we just created.
// Now get the contribution we just created.
$this
->
getContribution
();
$this
->
getContribution
();
}
}
...
@@ -587,7 +583,6 @@ class CRM_Core_Payment_StripeIPN {
...
@@ -587,7 +583,6 @@ class CRM_Core_Payment_StripeIPN {
* This happens when Stripe generates a new invoice and notifies us (normally by invoice.finalized but
* This happens when Stripe generates a new invoice and notifies us (normally by invoice.finalized but
* invoice.payment_succeeded sometimes arrives first).
* invoice.payment_succeeded sometimes arrives first).
*
*
* @return bool
* @throws \CiviCRM_API3_Exception
* @throws \CiviCRM_API3_Exception
* @throws \Civi\Payment\Exception\PaymentProcessorException
* @throws \Civi\Payment\Exception\PaymentProcessorException
*/
*/
...
@@ -604,7 +599,7 @@ class CRM_Core_Payment_StripeIPN {
...
@@ -604,7 +599,7 @@ class CRM_Core_Payment_StripeIPN {
'total_amount'
=>
$this
->
amount
,
'total_amount'
=>
$this
->
amount
,
'fee_amount'
=>
$this
->
fee
,
'fee_amount'
=>
$this
->
fee
,
];
];
return
$this
->
repeatContribution
(
$params
);
$this
->
repeatContribution
(
$params
);
// Don't touch the contributionRecur as it's updated automatically by Contribution.repeattransaction
// Don't touch the contributionRecur as it's updated automatically by Contribution.repeattransaction
}
}
...
...
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