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
f4ecbb9b
Commit
f4ecbb9b
authored
4 years ago
by
mattwire
Browse files
Options
Downloads
Patches
Plain Diff
Support future recurring start date on backend forms
parent
127eed76
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!124
6.5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Core/Payment/Stripe.php
+11
-1
11 additions, 1 deletion
CRM/Core/Payment/Stripe.php
with
11 additions
and
1 deletion
CRM/Core/Payment/Stripe.php
+
11
−
1
View file @
f4ecbb9b
...
...
@@ -141,7 +141,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
* @return bool
*/
public
function
supportsFutureRecurStartDate
()
{
return
FALS
E
;
return
TRU
E
;
}
/**
...
...
@@ -661,6 +661,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
'default_payment_method'
=>
$stripePaymentMethod
,
'metadata'
=>
[
'Description'
=>
$params
[
'description'
]],
'expand'
=>
[
'latest_invoice.payment_intent'
],
'billing_cycle_anchor'
=>
$this
->
getRecurBillingCycleDay
(
$params
),
];
// Create the stripe subscription for the customer
...
...
@@ -705,6 +706,15 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
return
$this
->
endDoPayment
(
$params
,
$newParams
);
}
private
function
getRecurBillingCycleDay
(
$params
)
{
if
(
empty
(
$params
[
'receive_date'
]))
{
return
strtotime
(
'now'
);
}
else
{
return
strtotime
(
$params
[
'receive_date'
]);
}
}
/**
* This performs the processing and recording of the paymentIntent for both recurring and non-recurring payments
* @param array $params
...
...
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