Skip to content

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

Fix getting amount value from form

Marcin Gębalab2c6bb10a748
diff --git a/saleor/dashboard/order/views.py b/saleor/dashboard/order/views.py
index 507a00e2d8..25cb764da9 100644
--- a/saleor/dashboard/order/views.py
+++ b/saleor/dashboard/order/views.py
@@ -95,7 +95,7 @@ class OrderDetails(StaffMemberOnlyMixin, DetailView):
elif action == 'refund' and payment.status == 'confirmed':
try:
payment.refund(
- amount=payment.captured_amount,
+ amount=form.cleaned_data['amount'],
user=self.request.user)
except PaymentError, e:
error_msg = _('Payment gateway error: ') + e.message