From 555748ef01fee21446f94403c095b7983ec2185b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 15 Dec 2024 19:15:39 +0100 Subject: [PATCH] Process Stripe and Braintree payments on checkout Closes #13691 --- modules/account_payment_braintree/routes.py | 2 ++ modules/account_payment_stripe/routes.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/modules/account_payment_braintree/routes.py b/modules/account_payment_braintree/routes.py index 148c5348c7..d3ad963681 100644 --- a/modules/account_payment_braintree/routes.py +++ b/modules/account_payment_braintree/routes.py @@ -46,6 +46,8 @@ def checkout(request, pool, model, id): record.braintree_set_nonce( request.form['payment_method_nonce'], request.form.get('device_data')) + if model == Payment.__name__: + Payment.process([record]) return Response( '', HTTPStatus.OK, diff --git a/modules/account_payment_stripe/routes.py b/modules/account_payment_stripe/routes.py index 3e396354d1..82272a3545 100644 --- a/modules/account_payment_stripe/routes.py +++ b/modules/account_payment_stripe/routes.py @@ -69,6 +69,8 @@ def checkout_end(request, pool, model, id): ]) except ValueError: abort(HTTPStatus.NOT_FOUND) + if model == Payment.__name__: + Payment.process([record]) record.stripe_intent_update() return Response( '', HTTPStatus.OK,