fix coinbase button not displayed on pricing page

This commit is contained in:
Son NK 2020-12-13 19:51:00 +01:00
parent 1f4631821b
commit 530160567b
2 changed files with 13 additions and 0 deletions

View File

@ -102,6 +102,15 @@
</a> <br>
Only the yearly plan is supported.
<div>
<a class="buy-with-crypto"
href="https://commerce.coinbase.com/checkout/5d2548b6-f626-41ea-8207-71096b393f33">
Buy with Crypto
</a>
<script src="https://commerce.coinbase.com/v1/checkout.js?version=201807">
</script>
</div>
<div>
<a class="buy-with-crypto" data-custom="{{ current_user.id }}"
href="{{ coinbase_url }}">

View File

@ -6,6 +6,7 @@ from app.config import (
PADDLE_MONTHLY_PRODUCT_ID,
PADDLE_YEARLY_PRODUCT_ID,
URL,
COINBASE_CHECKOUT_ID,
)
from app.dashboard.base import dashboard_bp
@ -17,12 +18,15 @@ def pricing():
flash("You are already a premium user", "warning")
return redirect(url_for("dashboard.index"))
coinbase_url = "https://commerce.coinbase.com/checkout/" + COINBASE_CHECKOUT_ID
return render_template(
"dashboard/pricing.html",
PADDLE_VENDOR_ID=PADDLE_VENDOR_ID,
PADDLE_MONTHLY_PRODUCT_ID=PADDLE_MONTHLY_PRODUCT_ID,
PADDLE_YEARLY_PRODUCT_ID=PADDLE_YEARLY_PRODUCT_ID,
success_url=URL + "/dashboard/subscription_success",
coinbase_url=coinbase_url,
)