def METHOD_NAME(request, paymentmethodid, invoiceid):
    invoice = get_object_or_404(Invoice, pk=invoiceid, deleted=False, finalized=True)
    if invoice.recipient_user != request.user:
        authenticate_backend_group(request, 'Invoice managers')
    return _invoice_payment(request, paymentmethodid, invoice)