mirror of
https://github.com/simple-login/app.git
synced 2026-04-07 19:27:34 +00:00
remove /coinbase_checkout
This commit is contained in:
committed by
Adrià Casajús
parent
bcfda1d8ea
commit
de85b766ae
@@ -1,5 +1,4 @@
|
||||
import arrow
|
||||
from coinbase_commerce import Client
|
||||
from flask import render_template, flash, redirect, url_for
|
||||
from flask_login import login_required, current_user
|
||||
|
||||
@@ -8,12 +7,8 @@ from app.config import (
|
||||
PADDLE_MONTHLY_PRODUCT_ID,
|
||||
PADDLE_YEARLY_PRODUCT_ID,
|
||||
URL,
|
||||
COINBASE_YEARLY_PRICE,
|
||||
COINBASE_API_KEY,
|
||||
)
|
||||
from app.dashboard.base import dashboard_bp
|
||||
from app.extensions import limiter
|
||||
from app.log import LOG
|
||||
from app.models import (
|
||||
AppleSubscription,
|
||||
Subscription,
|
||||
@@ -83,20 +78,3 @@ def subscription_success():
|
||||
return render_template(
|
||||
"dashboard/thank-you.html",
|
||||
)
|
||||
|
||||
|
||||
@dashboard_bp.route("/coinbase_checkout")
|
||||
@login_required
|
||||
@limiter.limit("5/minute")
|
||||
def coinbase_checkout_route():
|
||||
client = Client(api_key=COINBASE_API_KEY)
|
||||
charge = client.charge.create(
|
||||
name="1 Year SimpleLogin Premium Subscription",
|
||||
local_price={"amount": str(COINBASE_YEARLY_PRICE), "currency": "USD"},
|
||||
pricing_type="fixed_price",
|
||||
metadata={"user_id": current_user.id},
|
||||
)
|
||||
|
||||
LOG.d("Create coinbase charge %s", charge)
|
||||
|
||||
return redirect(charge["hosted_url"])
|
||||
|
||||
@@ -452,29 +452,6 @@
|
||||
Paddle supported payment methods <i class="fe fe-external-link"></i>
|
||||
</a>.
|
||||
</p>
|
||||
<hr />
|
||||
<p>
|
||||
Furthermore we also support cryptocurrencies for the yearly plan via
|
||||
<a href="https://commerce.coinbase.com"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer">
|
||||
Coinbase Commerce <i class="fe fe-external-link"></i>
|
||||
</a>, which currently supports Bitcoin, Bitcoin Cash, DAI, ApeCoin, Dogecoin, Ethereum, Litecoin, SHIBA INU, Tether and USD Coin.
|
||||
</p>
|
||||
<p>
|
||||
In the future, we are going to support Monero as well. In the meantime, please send us an email at <a href="mailto:support@simplelogin.zendesk.com" target="_blank">support@simplelogin.zendesk.com</a> if you want to use this cryptocurrency.
|
||||
</p>
|
||||
<div class="d-flex justify-content-center">
|
||||
<a class="btn btn-outline-primary text-center"
|
||||
href="{{ url_for("dashboard.coinbase_checkout_route") }}"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer">
|
||||
Upgrade to Premium - cryptocurrency
|
||||
<br />
|
||||
$36 / year
|
||||
<i class="fe fe-external-link"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -706,8 +683,8 @@
|
||||
data-parent="#pricing-faq">
|
||||
<div class="card-body">
|
||||
<p>
|
||||
Yes you can also buy SimpleLogin subscription coupon via
|
||||
<a href="https://digitalgoods.proxysto.re/en" target="_blank">ProxyStore <i class="fe fe-external-link"></i></a>,
|
||||
Yes you can also buy SimpleLogin subscription coupon via
|
||||
<a href="https://digitalgoods.proxysto.re/en" target="_blank">ProxyStore <i class="fe fe-external-link"></i></a>,
|
||||
our official reseller. They support Monero, Bitcoin, Cash and more.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -72,11 +72,6 @@
|
||||
<div>
|
||||
Yearly plan subscribed with cryptocurrency which expires on
|
||||
{{ coinbase_sub.end_at.format("YYYY-MM-DD") }}.
|
||||
<a href="{{ url_for("dashboard.coinbase_checkout_route") }}"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer">
|
||||
Extend Subscription <i class="fe fe-external-link"></i>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if partner_sub %}
|
||||
|
||||
Reference in New Issue
Block a user