def METHOD_NAME():
    from . import paymentrequest
    try:
        request = paymentrequest.get_payment_request(payment_url)
    except Bip270Exception as e:
        if on_pr_error:
            on_pr_error(e.args[0])
            return
        raise e
    if on_pr:
        on_pr(request)