I want to pass a token to a route from my script tag but cant find a way to make this work.
So far I have made this:
<script>
some code...
window.location.href = {{ url_for ("payment_success", token=token ) }};
</script>
But it's not returning anything. All my routes are ok. I don't have really much idea about javascript. Thanks in advance