Hola nuevamente,
Me encontrado con un nuevo bug al momento de eliminar un pago que aún no ha sido finalizado. Te adjunto el error:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 179, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/django/views/generic/base.py", line 70, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "/opt/project/Voucher/viewsets/rejected_voucher.py", line 34, in post
client.payments.delete(voucher.payment_id)
File "/usr/local/lib/python3.6/site-packages/pykhipu/payments.py", line 57, in delete
return SuccessResponse.from_response(response)
File "/usr/local/lib/python3.6/site-packages/pykhipu/responses.py", line 14, in from_response
return cls.from_data(data)
File "/usr/local/lib/python3.6/site-packages/pykhipu/responses.py", line 540, in from_data
return cls(data['message'])
KeyError: 'message'
Realicé un print al response que entrega khipu y por lo visto ahora retorna un diccionario vacío.