Fix bug: correct the way to get timestamp from datetime

This commit is contained in:
PCoder 2019-07-18 09:57:45 +05:30
parent 494d68bb47
commit ee90ee5624

View file

@ -1035,7 +1035,7 @@ class OrdersHostingDetailView(LoginRequiredMixin, DetailView, FormView):
stripe_api_cus_id, stripe_api_cus_id,
[{"plan": stripe_plan.get( [{"plan": stripe_plan.get(
'response_object').stripe_plan_id}], 'response_object').stripe_plan_id}],
int(datetime.datetime.now().timestamp()) + 300 if settings.ADD_TRIAL_PERIOD_TO_SUBSCRIPTION else None) int(datetime.now().timestamp()) + 300 if settings.ADD_TRIAL_PERIOD_TO_SUBSCRIPTION else None)
stripe_subscription_obj = subscription_result.get('response_object') stripe_subscription_obj = subscription_result.get('response_object')
# Check if the subscription was approved and is active # Check if the subscription was approved and is active
if (stripe_subscription_obj is None or if (stripe_subscription_obj is None or