Payment success page error in erpnext 14

i’m using the erpnext v14 manual installation and facing this issue. After the successful payment, when redirecting to the payment success page, I’m facing this error.

After Looking into the code, I knew that in the payment_success.py file, frappe is trying to get the docname and doctype but unable to get this.

i’m getting doctype and docname as none because form_dict only contains “redirect_to” field and due to this, error is occuring here

doc = frappe.get_doc(doctype, docname)

In the documentation, the only thing mentioned is to put the keys into the braintree settings to setup payment gateway and the payment is working successfully but not building the payment_success page only due to this error.

Traceback (most recent call last):
File “apps/frappe/frappe/website/serve.py”, line 20, in get_response
response = renderer_instance.render()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “apps/frappe/frappe/website/page_renderers/template_page.py”, line 84, in render
html = self.get_html()
^^^^^^^^^^^^^^^
File “apps/frappe/frappe/website/utils.py”, line 529, in cache_html_decorator
html = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “apps/frappe/frappe/website/page_renderers/template_page.py”, line 95, in get_html
self.update_context()
File “apps/frappe/frappe/website/page_renderers/template_page.py”, line 163, in update_context
data = self.run_pymodule_method(“get_context”)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “apps/frappe/frappe/website/page_renderers/template_page.py”, line 223, in run_pymodule_method
return method(self.context)
^^^^^^^^^^^^^^^^^^^^
File “apps/payments/payments/templates/pages/payment_success.py”, line 10, in get_context
doc = frappe.get_doc(frappe.local.form_dict.doctype, frappe.local.form_dict.docname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “apps/frappe/frappe/init.py”, line 1346, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “apps/frappe/frappe/model/document.py”, line 75, in get_doc
raise ValueError(“First non keyword argument must be a string or dict”)
ValueError: First non keyword argument must be a string or dict

which version of payments, please share the version.

Payments: v0.0.1 (develop)

Please install the version 14 of payment.

Okay, will let you know after installing it.

Same issue

migrate the site and build the app, we have’t found the issue in v14.

No, not working.

Here, when I try to print frappe.local.form_dict then it prints dictionary with key redirect_to means I’m not getting docname or doctype

In the below image, when we try to get the doctype and docname from frappe.local.form_dict, error is occuring in the marked line in the image