Braintree payemtn error

Hi
I created an account ( sandbox) on braintree and created a test sales invoice.
Email was sent.
CLick on link
Entered test card nr
Made payment.
And according to the trace on Braintree, the transaction was passed as succesful.
However I am getting this error on my erpnext payment page…

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

I can see that there is a file “payment_success.py” involved so it seems the payment was actually successful. But its not happy with an argument been passed back ??

Anyone perhaps have some advise please ?

Update…

I found the fix for this…
PR #122

So payment is now indicated as successful, but how is the payment processed ?
I would have thought that a Payment Entry is created but a google-search yielded that ERPNext should create a Journal Entry ? But I dont see that as well ?

If someone can confirm what should be happening now ?