Open gleichaberanders opened 5 years ago
Can you check pretix.log
for the actual error message, please?
Its just in the test system, if we switch it to live - it works :)
Hi there @raphaelm, first of all: thanks for your plugin.
I've encountered the same problem @gleichaberanders has encountered. In test mode, using Mollie test keys, I too receive a 500 error.
pretix.log
:
ERROR 2019-10-04 18:41:40,180 django.request log Internal Server Error: /syntax/test-event/mollie/webhook/1/
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/pretix_mollie/views.py", line 150, in handle_payment
resp.raise_for_status()
File "/usr/local/lib/python3.6/site-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 422 Client Error: Unprocessable Entity for url: https://api.mollie.com/v2/payments/tr_K7qgaWBnQp?testmode=true
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/pretix/src/pretix/presale/utils.py", line 158, in wrap
response = func(request=request, *args, **kwargs)
File "/pretix/src/pretix/presale/utils.py", line 158, in wrap
response = func(request=request, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/django/views/generic/base.py", line 71, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/django/utils/decorators.py", line 45, in _wrapper
return bound_method(*args, **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 97, in dispatch
return handler(request, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pretix_mollie/views.py", line 287, in post
handle_payment(self.payment, request.POST.get('id'))
File "/usr/local/lib/python3.6/site-packages/pretix_mollie/views.py", line 206, in handle_payment
raise PaymentException(_('We had trouble communicating with Mollie. Please try again and get in touch '
pretix.base.payment.PaymentException: We had trouble communicating with Mollie. Please try again and get in touch with us if this problem persists.
Note: I’m not sure if I used Mollie’s OAuth or API key. Will check later this evening.
This seems to occur for both OAuth and API key implementations. For further debugging we'd need to print Mollie's detail
and field
strings in the json response body.
https://docs.mollie.com/guides/handling-errors -> CTRL + F -> "422"
Hey together,
i just implemented the Mollie plugin in our pretix system. Mollie says the payment is okay, but pretix is unable to get this information. First step: we just select sofort via mollie, we authorize the test payment:
After that we just get this information / internal server error:
(URL: https://url.shop/eventname/veranstaltung/mollie/return/HR9AQ/e2c32a748445edd56a5f081daebf84e566b25cac/34/)
If we check Mollie, it says the payment is okay, but there is an web hook error:
If we check the pretix backend, we are not able to see that the order is payed: