`Payment.refund()` does not refund
radekholy24 opened this issue · 2 comments
radekholy24 commented
Hello,
Expected behavior
If you need to refund a payment, you can do this by calling the
refund()
method on your Payment instance:from payments import get_payment_model Payment = get_payment_model() payment = Payment.objects.get() payment.refund()By default, the total amount would be refunded.
-- https://django-payments.readthedocs.io/en/latest/refund.html
Actual behavior
>>> from payments import get_payment_model
>>> Payment = get_payment_model()
>>> payment = Payment.objects.get()
>>> payment.refund()
>>> payment.captured_amount
Decimal("2.00")
>>> payment.status
'confirmed'
(Neither the captured_amount
nor the status
changes after a call to refund()
)
radekholy24 commented
Here is my PR to fix the issue: #410