Skip to content
New issue

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

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

Already on GitHub? # to your account

Reverse for 'process_payment' not found. 'process_payment' is not a valid view function or pattern name. #396

Open
AhmedSalam22 opened this issue Jan 10, 2024 · 1 comment

Comments

@AhmedSalam22
Copy link

image
`
Traceback (most recent call last):
File "C:\Users\admin\wwork\env\lib\site-packages\django\core\handlers\exception.py", line 42, in inner
response = await get_response(request)
File "C:\Users\admin\wwork\env\lib\site-packages\django\core\handlers\base.py", line 253, in get_response_async
response = await wrapped_callback(
File "C:\Users\admin\wwork\ok-api\openbook_payments\views.py", line 21, in payment_details
form = payment.get_form(data=request.POST or None)
File "C:\Users\admin\wwork\env\lib\site-packages\payments\models.py", line 143, in get_form
return provider.get_form(self, data=data)
File "C:\Users\admin\wwork\env\lib\site-packages\payments\paypal_init
.py", line 228, in get_form
payment_data = self.create_payment(payment)
File "C:\Users\admin\wwork\env\lib\site-packages\payments\paypal_init_.py", line 261, in create_payment
product_data = self.get_product_data(payment, extra_data)
File "C:\Users\admin\wwork\env\lib\site-packages\payments\paypal_init_.py", line 216, in get_product_data
return_url = self.get_return_url(payment)
File "C:\Users\admin\wwork\env\lib\site-packages\payments\core.py", line 127, in get_return_url
payment_link = payment.get_process_url()
File "C:\Users\admin\wwork\env\lib\site-packages\payments\models.py", line 185, in get_process_url
return reverse("process_payment", kwargs={"token": self.token})
File "C:\Users\admin\wwork\env\lib\site-packages\django\urls\base.py", line 88, in reverse
return resolver._reverse_with_prefix(view, prefix, *args, **kwargs)
File "C:\Users\admin\wwork\env\lib\site-packages\django\urls\resolvers.py", line 828, in _reverse_with_prefix
raise NoReverseMatch(msg)

Exception Type: NoReverseMatch at /payment/6
Exception Value: Reverse for 'process_payment' not found. 'process_payment' is not a valid view function or pattern name.`

@WhyNotHugo
Copy link
Member

Can you share you urls.py?

Did you add the URLs mentioned in the documentation? https://django-payments.readthedocs.io/en/latest/install.html#configure-django

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

No branches or pull requests

2 participants