Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mollie Internal Server Error #5

Open
gleichaberanders opened this issue Mar 18, 2019 · 5 comments
Open

Mollie Internal Server Error #5

gleichaberanders opened this issue Mar 18, 2019 · 5 comments

Comments

@gleichaberanders
Copy link

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:

Bildschirmfoto 2019-03-18 um 21 36 01

After that we just get this information / internal server error:
Bildschirmfoto 2019-03-18 um 21 48 40
(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:
Bildschirmfoto 2019-03-18 um 21 38 27

If we check the pretix backend, we are not able to see that the order is payed:
Bildschirmfoto 2019-03-18 um 21 39 38
Bildschirmfoto 2019-03-18 um 21 39 33

@raphaelm
Copy link
Member

Can you check pretix.log for the actual error message, please?

@gleichaberanders
Copy link
Author

Its just in the test system, if we switch it to live - it works :)

@lesander
Copy link

lesander commented Oct 4, 2019

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.

@raphaelm raphaelm reopened this Oct 6, 2019
@lesander
Copy link

lesander commented Oct 6, 2019

Note: I’m not sure if I used Mollie’s OAuth or API key. Will check later this evening.

@lesander
Copy link

lesander commented Oct 7, 2019

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants