diff --git a/config.ini.example b/config.ini.example index 84a86e9..0e7a3e7 100644 --- a/config.ini.example +++ b/config.ini.example @@ -23,3 +23,6 @@ your_email=joe@bloe.com # SQL connection string connection-string=postgresql://postgres@localhost/fosspay + +# Click here first: https://dashboard.stripe.com/account/bitcoin/enable +enable-bitcoin=no diff --git a/scripts/index.js b/scripts/index.js index f1f7148..4afb174 100644 --- a/scripts/index.js +++ b/scripts/index.js @@ -72,7 +72,7 @@ description: donation.type == "monthly" ? "Monthly Donation" : "One-time Donation", panelLabel: "Donate {{amount}}", amount: donation.amount, - bitcoin: donation.type == "once", + bitcoin: donation.type == "once" && window.bitcoin, token: function(token) { e.target.setAttribute("disabled", ""); e.target.textContent = "Submitting..."; diff --git a/templates/index.html b/templates/index.html index 7211fd0..2f2c7f5 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,6 +4,7 @@ window.stripe_key = "{{ _cfg("stripe-publish") }}"; window.avatar = "{{ avatar }}"; window.your_name = "{{ _cfg("your-name") }}"; +window.bitcoin = "{{ _cfg("enable-bitcoin") }}" === "yes"; @@ -79,7 +80,9 @@ window.your_name = "{{ _cfg("your-name") }}";

How often?

+ {% if _cfg("enable-bitcoin") == "yes" %}

Bitcoin is only supported for one-time donations.

+ {% endif %}