def METHOD_NAME(request: RefundRequest) -> None:
    """Mark a refund request as manually refunded by bank transfer."""
    payment = request.payment
    payment.lock()
    refund_amount = payment.amount - request.donation
    refund = BankRefund(payment, refund_amount)
    app.logger.info(
        f"Handling manual refund request {request.id} for {payment.provider} {payment.id}. "
        f"Refund amount {refund_amount} {payment.currency}. "
        f"Donation amount {request.donation} {payment.currency}. "
    )
    with db.session.no_autoflush:
        for purchase in payment.purchases:
            purchase.refund_purchase(refund)
    payment.state = "refunded"
    db.session.commit()
    send_refund_email(request, refund_amount)