Skip to content

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

Fix payment action messages

Marcin Gębalae7c9de17bcc9
diff --git a/saleor/dashboard/order/views.py b/saleor/dashboard/order/views.py
index d5fdba819d..f224494388 100644
--- a/saleor/dashboard/order/views.py
+++ b/saleor/dashboard/order/views.py
@@ -83,10 +83,12 @@ def manage_payment(request, pk, action):
else:
amount = form.cleaned_data['amount']
currency = payment.currency
- if action in ['capture', 'refund']:
- comment = _('%(action)sed %(amount)s %(currency)s' % {
- 'action': action.capitalize(), 'amount': amount,
- 'currency': currency})
+ if action == 'capture':
+ comment = _('Captured %(amount)s %(currency)s' % {
+ 'amount': amount, 'currency': currency})
+ elif action == 'refund':
+ comment = _('Refunded %(amount)s %(currency)s' % {
+ 'amount': amount, 'currency': currency})
elif action == 'release':
comment = _('Released payment')
payment.order.create_history_entry(comment=comment,