django-payments icon indicating copy to clipboard operation
django-payments copied to clipboard

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

Open AhmedSalam22 opened this issue 1 year ago • 1 comments

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.`

AhmedSalam22 avatar Jan 10 '24 10:01 AhmedSalam22

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

WhyNotHugo avatar Jan 22 '24 14:01 WhyNotHugo