Don't load /btcpay if BTCPAY_PRIVATE_KEY un-set
This commit is contained in:
parent
e3a4776a5d
commit
7ed847251f
@ -48,6 +48,10 @@ def validate_dollars():
|
||||
def btcpay_payment():
|
||||
errors = list()
|
||||
|
||||
if current_app.config['BTCPAY_PRIVATE_KEY'] == "":
|
||||
flash("BTCPay is not enabled on this server")
|
||||
return redirect(url_for("console.account_balance"))
|
||||
|
||||
if request.method == "POST":
|
||||
result = validate_dollars()
|
||||
errors = result[0]
|
||||
@ -289,4 +293,4 @@ def success():
|
||||
# except stripe.error.SignatureVerificationError:
|
||||
# print("/payment/stripe/webhook returned 400: invalid signature")
|
||||
# abort(400, "invalid signature")
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user