def METHOD_NAME(
    staff_api_client, permission_group_manage_orders, payment_txn_preauth
):
    # given
    permission_group_manage_orders.user_set.add(staff_api_client.user)
    payment = payment_txn_preauth
    assert payment.charge_status == ChargeStatus.NOT_CHARGED
    payment_id = graphene.Node.to_global_id("Payment", payment.pk)
    variables = {"paymentId": payment_id, "amount": str(payment_txn_preauth.total)}
    # when
    response = staff_api_client.post_graphql(CAPTURE_QUERY, variables)
    # then
    content = get_graphql_content(response)
    data = content["data"]["paymentCapture"]
    assert not data["errors"]
    payment_txn_preauth.refresh_from_db()
    assert payment.charge_status == ChargeStatus.FULLY_CHARGED
    assert payment.transactions.count() == 2
    txn = payment.transactions.last()
    assert txn.kind == TransactionKind.CAPTURE