Skip to content

Commit

Permalink
fix captured_amount not being saved when processing data
Browse files Browse the repository at this point in the history
  • Loading branch information
radekholy24 committed May 13, 2024
1 parent c542eb1 commit de4b4d1
Show file tree
Hide file tree
Showing 3 changed files with 246 additions and 37 deletions.
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
History
-------

Unreleased
**********
* fix captured_amount not being saved when processing data

1.4.0 (2024-04-12)
******************
* fix backward compatibility by making PayuProvider's get_refund_description argument optional
Expand Down
3 changes: 3 additions & 0 deletions payments_payu/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,9 @@ def process_notification(self, payment, request):
data["order"]["totalAmount"],
data["order"]["currencyCode"],
)
payment.objects.filter(pk=payment.pk).update(
captured_amount=payment.captured_amount
)
payment.change_status(status)
return HttpResponse("ok", status=200)
return HttpResponse("not ok", status=500)
Expand Down

0 comments on commit de4b4d1

Please sign in to comment.