Files
capsulflask
btcpay
schema_migrations
shell_scripts
static
templates
about-ssh.html
account-balance.html
admin.html
base.html
btcpay.html
capsul-detail.html
capsuls.html
changelog.html
create-capsul.html
display-metric.html
faq.html
index.html
login-landing.html
login.html
pricing.html
ssh-public-keys.html
stripe.html
support.html
__init__.py
admin.py
auth.py
cli.py
console.py
db.py
db_model.py
http_client.py
hub_api.py
hub_model.py
landing.py
metrics.py
payment.py
shared.py
spoke_api.py
spoke_model.py
readme
.drone.yml
.gitignore
Dockerfile
LICENSE.md
Pipfile
Pipfile.lock
README.md
app.py
docker-compose.yml
letsencrypt-root-ca.crt
setup.cfg
setup.py
capsul-flask/capsulflask/templates/stripe.html
forest 672ff49d6d implement content-security-policy, static assets cache bust, and fix
stripe back button ratchet issue

because the only way to use stripe checkout is to run their proprietary
JS, and we arent using a SPA, naturally what happens is, when you land
on the stripe payment page if you hit the back button it goes back to
the same page where you got re-directed to stripe. this commit fixes
that.
2020-05-22 15:20:26 -05:00

42 lines
1.1 KiB
HTML

{% extends 'base.html' %}
{% block title %}Pay with Stripe{% endblock %}
{% block head %}
{% if stripe_checkout_session_id %}
<script src="https://js.stripe.com/v3/"></script>
{% endif %}
{% endblock %}
{% block content %}
{% if stripe_checkout_session_id %}
<div class="row third-margin">
<h1>REDIRECTING...</h1>
</div>
<input id="stripe_public_key" type="hidden" value="{{ stripe_public_key }}"/>
<input id="stripe_checkout_session_id" type="hidden" value="{{ stripe_checkout_session_id }}"/>
<script src="{{ url_for('static', filename='pay-with-stripe.js') }}"></script>
{% else %}
<div class="row third-margin">
<h1>PAY WITH STRIPE</h1>
</div>
<div class="row half-margin">
<form method="post">
<div class="row justify-start">
<label for="dollars">$</label>
<input type="number" id="dollars" name="dollars"></input>
</div>
<div class="row justify-end">
<input type="submit" value="Pay With Stripe">
</div>
</form>
</div>
{% endif %}
{% endblock %}
{% block pagesource %}/templates/stripe.html{% endblock %}