mirror of https://github.com/zulip/zulip.git
billing: Better error message for dev on lacking Stripe credentials.
Normal server admins will never run this code, and zulipchat.com will have this information configured before users see it, so this message is really just for development.
This commit is contained in:
parent
455b77225f
commit
3aa5529b96
|
@ -123,6 +123,10 @@ def add_payment_method(request: HttpRequest) -> HttpResponse:
|
||||||
ctx["error_message"] = _("You should be an administrator of the organization %s to view this page."
|
ctx["error_message"] = _("You should be an administrator of the organization %s to view this page."
|
||||||
% (user.realm.name,))
|
% (user.realm.name,))
|
||||||
return render(request, 'zilencer/payment.html', context=ctx)
|
return render(request, 'zilencer/payment.html', context=ctx)
|
||||||
|
if STRIPE_PUBLISHABLE_KEY is None:
|
||||||
|
# Dev-only message; no translation needed.
|
||||||
|
ctx["error_message"] = "Missing Stripe config. In dev, add to zproject/dev-secrets.conf ."
|
||||||
|
return render(request, 'zilencer/payment.html', context=ctx)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if request.method == "GET":
|
if request.method == "GET":
|
||||||
|
|
Loading…
Reference in New Issue