Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add sugestion about where to put logic of sending digital products

Mira Szewczyk4bc23d4d4c2e
diff --git a/saleor/order/views.py b/saleor/order/views.py
index daada606b6..7ea0d274f0 100644
--- a/saleor/order/views.py
+++ b/saleor/order/views.py
@@ -90,6 +90,8 @@ def start_payment(request, order, variant):
try:
form = payment.get_form(data=request.POST or None)
except RedirectNeeded as redirect_to:
+ # NOTE: this is good place to add logic of sending
+ # digital products. Make sure that payment status is confirmed
return redirect(str(redirect_to))
except Exception:
logger.exception('Error communicating with the payment gateway')