diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 649810d0..bf87d9b9 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -530,11 +530,10 @@ class OrderConfirmationView(DetailView): or stripe_subscription_obj.status != 'active'): # At this point, we have created a Stripe API card and # associated it with the customer; but the transaction failed - # due to some reason. We may want to dissociate this card. - # stripe_utils.dissociate_customer_card( - # stripe_api_cus_id, - # card_details_dict['card_id'] - # ) + # due to some reason. So, we would want to dissociate this card + # here. + # ... + msg = subscription_result.get('error') messages.add_message(self.request, messages.ERROR, msg, extra_tags='failed_payment') diff --git a/hosting/views.py b/hosting/views.py index f8bcbe14..6af1885b 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -1054,11 +1054,10 @@ class OrdersHostingDetailView(LoginRequiredMixin, DetailView): stripe_subscription_obj.status != 'active'): # 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 dissociate this card. - stripe_utils.dissociate_customer_card( - request.user.stripecustomer.stripe_id, - card_details_dict['card_id'] - ) + # due to some reason. So, we would want to dissociate this card + # here. + # ... + msg = subscription_result.get('error') messages.add_message(self.request, messages.ERROR, msg, extra_tags='failed_payment')