Process Stripe and Braintree payments on checkout

Closes #13691
This commit is contained in:
Cédric Krier committed 2024-12-15 19:15:39 +01:00
1 parent 001bfe69c6
commit 555748ef01
2 files changed
+4

No files matched your search

@@ -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(
'<body onload="window.close();"></body>',
HTTPStatus.OK,
+2
View File
@@ -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(
'<body onload="window.close()">', HTTPStatus.OK,