mirror of
https://github.com/plausible/analytics.git
synced 2024-12-25 02:24:55 +03:00
Use payment error
This commit is contained in:
parent
73a2dc00ea
commit
6fc0e7ba92
@ -153,7 +153,7 @@ defmodule PlausibleWeb.BillingController do
|
|||||||
msg =
|
msg =
|
||||||
case e do
|
case e do
|
||||||
%{"code" => 147} ->
|
%{"code" => 147} ->
|
||||||
"We were unable to charge your card. Make sure your payment details are up to date and try again."
|
"We were unable to charge your card. Click 'update billing info' to update your payment details and try again."
|
||||||
|
|
||||||
%{"message" => msg} when not is_nil(msg) ->
|
%{"message" => msg} when not is_nil(msg) ->
|
||||||
msg
|
msg
|
||||||
@ -172,10 +172,7 @@ defmodule PlausibleWeb.BillingController do
|
|||||||
)
|
)
|
||||||
|
|
||||||
conn
|
conn
|
||||||
|> put_flash(
|
|> put_flash(:error, msg)
|
||||||
:error,
|
|
||||||
"Something went wrong. Please try again or contact support at support@plausible.io"
|
|
||||||
)
|
|
||||||
|> redirect(to: "/settings")
|
|> redirect(to: "/settings")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user