forked from 3wordchant/capsul-flask
stripe payment processor
This commit is contained in:
@ -38,10 +38,10 @@
|
||||
<h1>PAYMENT OPTIONS</h1>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="/console/stripe">Add funds with Credit/Debit (stripe)</a>
|
||||
<a href="/stripe">Add funds with Credit/Debit (stripe)</a>
|
||||
<ul><li>notice: stripe will load nonfree javascript </li></ul>
|
||||
</li>
|
||||
<li><a href="/console/btcpay">Add funds with Bitcoin/Litecoin/Monero (btcpay)</a></li>
|
||||
<li><a href="/btcpay">Add funds with Bitcoin/Litecoin/Monero (btcpay)</a></li>
|
||||
|
||||
<li>Cash: email treasurer@cyberia.club</li>
|
||||
</ul>
|
||||
|
@ -5,6 +5,7 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<meta name="Description" content="Cyberia Capsul">
|
||||
{% block head %}{% endblock %}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
|
39
capsulflask/templates/stripe.html
Normal file
39
capsulflask/templates/stripe.html
Normal file
@ -0,0 +1,39 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Capsuls{% endblock %}
|
||||
|
||||
{% block head %}<script src="https://js.stripe.com/v3/"></script>{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="third-margin">
|
||||
<h1>PAY WITH STRIPE</h1>
|
||||
</div>
|
||||
<div class="row half-margin">
|
||||
<form method="post">
|
||||
<div class="row justify-start">
|
||||
<label for="content">$</label>
|
||||
<input type="number" id="name" name="name"></input>
|
||||
</div>
|
||||
<div class="row justify-end">
|
||||
<input type="submit" value="Pay With Stripe">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% if stripe_checkout_session_id %}
|
||||
<script>
|
||||
Stripe("{{ stripe_public_key }}")
|
||||
.redirectToCheckout({
|
||||
sessionId: "{{ stripe_checkout_session_id }}",
|
||||
})
|
||||
.then(function(result) {
|
||||
if (result.error) {
|
||||
alert("Stripe.redirectToCheckout() failed with: " + result.error.message)
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block pagesource %}/templates/stripe.html{% endblock %}
|
Reference in New Issue
Block a user