Skip to content
Snippets Groups Projects
Commit 04aa8c30 authored by mattwire's avatar mattwire
Browse files

Fix issue with future start date for memberships when it is 'now'

parent 558065b5
Branches
Tags
1 merge request!1246.5
......@@ -728,8 +728,14 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
*/
private function getRecurBillingCycleDay($params) {
if (isset($params['receive_date'])) {
return strtotime($params['receive_date']);
$receiveDateTimestamp = strtotime($params['receive_date']);
// If `receive_date` was set to "now" it will be in the past (by a few seconds) by the time we actually send it to Stripe.
if ($receiveDateTimestamp > strtotime('now')) {
// We've specified a receive_date in the future, use it!
return $receiveDateTimestamp;
}
}
// Either we had no receive_date or receive_date was in the past (or "now" when form was submitted).
return NULL;
}
......
......@@ -14,7 +14,7 @@
<author>Matthew Wire (MJW Consulting)</author>
<email>mjw@mjwconsult.co.uk</email>
</maintainer>
<releaseDate>2020-07-18</releaseDate>
<releaseDate>2020-07-31</releaseDate>
<version>6.5-dev</version>
<develStage>alpha</develStage>
<compatibility>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment