From f5170cce5f9f88739f792cc653fd3497be0cb09a Mon Sep 17 00:00:00 2001 From: PCoder Date: Sun, 24 Dec 2017 12:51:16 +0100 Subject: [PATCH] Call DG subscribe_customer_to_plan with trial period until first of next month --- digitalglarus/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/digitalglarus/views.py b/digitalglarus/views.py index 4efa21db..ff567036 100644 --- a/digitalglarus/views.py +++ b/digitalglarus/views.py @@ -392,7 +392,8 @@ class MembershipPaymentView(LoginRequiredMixin, IsNotMemberMixin, FormView): ) subscription_result = stripe_utils.subscribe_customer_to_plan( customer.stripe_id, - [{"plan": stripe_plan.get('response_object').stripe_plan_id}] + [{"plan": stripe_plan.get('response_object').stripe_plan_id}], + trial_end=membership_type.next_month_in_sec_since_epoch ) stripe_subscription_obj = subscription_result.get( 'response_object'