Commit qr code function