From 81ec1125cb58ee3627a1c648e38535f209922af6 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sun, 11 Oct 2020 17:21:15 +0530 Subject: [PATCH] Capture both actions requires_action and requires_source_action --- datacenterlight/views.py | 2 +- hosting/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 7dde0fa6..973ce738 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -959,7 +959,7 @@ class OrderConfirmationView(DetailView, FormView): ret = stripe.PaymentIntent.confirm( latest_invoice.payment_intent ) - if ret.status == 'requires_action': + if ret.status == 'requires_source_action' or ret.status == 'requires_action': pi = stripe.PaymentIntent.retrieve( latest_invoice.payment_intent ) diff --git a/hosting/views.py b/hosting/views.py index cc5cd057..7f322e91 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -1205,7 +1205,7 @@ class OrdersHostingDetailView(LoginRequiredMixin, DetailView, FormView): ret = stripe.PaymentIntent.confirm( latest_invoice.payment_intent ) - if ret.status == 'requires_action': + if ret.status == 'requires_source_action' or ret.status == 'requires_action': pi = stripe.PaymentIntent.retrieve( latest_invoice.payment_intent )