From 530160567bef3d74f96e2c75b228d7a4bc2ca698 Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Sun, 13 Dec 2020 19:51:00 +0100 Subject: [PATCH] fix coinbase button not displayed on pricing page --- app/dashboard/templates/dashboard/pricing.html | 9 +++++++++ app/dashboard/views/pricing.py | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/app/dashboard/templates/dashboard/pricing.html b/app/dashboard/templates/dashboard/pricing.html index 21c64045..3ee30ed2 100644 --- a/app/dashboard/templates/dashboard/pricing.html +++ b/app/dashboard/templates/dashboard/pricing.html @@ -102,6 +102,15 @@
Only the yearly plan is supported. +
+ + Buy with Crypto + + +
+
diff --git a/app/dashboard/views/pricing.py b/app/dashboard/views/pricing.py index aeb39652..b99353fc 100644 --- a/app/dashboard/views/pricing.py +++ b/app/dashboard/views/pricing.py @@ -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, )