Accept subscription status = trialing because that is what we will be

if we are using the trial period
This commit is contained in:
PCoder 2019-07-18 10:13:03 +05:30
commit ceff7964e9
3 changed files with 11 additions and 5 deletions

View file

@ -1039,7 +1039,9 @@ class OrdersHostingDetailView(LoginRequiredMixin, DetailView, FormView):
stripe_subscription_obj = subscription_result.get('response_object')
# Check if the subscription was approved and is active
if (stripe_subscription_obj is None or
stripe_subscription_obj.status != 'active'):
(stripe_subscription_obj.status != 'active' and
stripe_subscription_obj.status != 'trialing')
):
# At this point, we have created a Stripe API card and
# associated it with the customer; but the transaction failed
# due to some reason. So, we would want to dissociate this card