diff --git a/app/serializers/discourse_subscriptions/payment_serializer.rb b/app/serializers/discourse_subscriptions/payment_serializer.rb index c900bffa..e052bc1c 100644 --- a/app/serializers/discourse_subscriptions/payment_serializer.rb +++ b/app/serializers/discourse_subscriptions/payment_serializer.rb @@ -53,6 +53,8 @@ def currency_unit "S$" when "zar" "R" + when "chf" + "CHF" else "$" end diff --git a/assets/javascripts/discourse/controllers/admin-plugins-discourse-subscriptions-products-show-plans-show.js b/assets/javascripts/discourse/controllers/admin-plugins-discourse-subscriptions-products-show-plans-show.js index 0ecc9e2d..88e14892 100644 --- a/assets/javascripts/discourse/controllers/admin-plugins-discourse-subscriptions-products-show-plans-show.js +++ b/assets/javascripts/discourse/controllers/admin-plugins-discourse-subscriptions-products-show-plans-show.js @@ -43,6 +43,7 @@ export default class AdminPluginsDiscourseSubscriptionsProductsShowPlansShowCont { id: "SGD", name: "SGD" }, { id: "JPY", name: "JPY" }, { id: "ZAR", name: "ZAR" }, + { id: "CHF", name: "CHF" }, ]; } diff --git a/assets/javascripts/discourse/helpers/format-currency.js b/assets/javascripts/discourse/helpers/format-currency.js index afd00f9b..8bdbe636 100644 --- a/assets/javascripts/discourse/helpers/format-currency.js +++ b/assets/javascripts/discourse/helpers/format-currency.js @@ -25,6 +25,9 @@ export function formatCurrency([currency, amount]) { case "ZAR": currencySign = "R"; break; + case "CHF": + currencySign = "CHF"; + break; default: currencySign = "$"; } diff --git a/config/settings.yml b/config/settings.yml index 45df0df5..38d1700e 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -35,6 +35,7 @@ discourse_subscriptions: - DKK - SGD - ZAR + - CHF discourse_subscriptions_campaign_enabled: client: true default: false