FEATURE: Add support for CHF currency (#254)

Stripe supports the Swiss Franc so we can add support for it.

https://meta.discourse.org/t/316003
This commit is contained in:
Blake Erickson 2024-12-05 11:01:31 -07:00 committed by GitHub
parent d82b34080b
commit 1811b5955d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 0 deletions

View File

@ -53,6 +53,8 @@ module DiscourseSubscriptions
"S$"
when "zar"
"R"
when "chf"
"CHF"
else
"$"
end

View File

@ -43,6 +43,7 @@ export default class AdminPluginsDiscourseSubscriptionsProductsShowPlansShowCont
{ id: "SGD", name: "SGD" },
{ id: "JPY", name: "JPY" },
{ id: "ZAR", name: "ZAR" },
{ id: "CHF", name: "CHF" },
];
}

View File

@ -25,6 +25,9 @@ export function formatCurrency([currency, amount]) {
case "ZAR":
currencySign = "R";
break;
case "CHF":
currencySign = "CHF";
break;
default:
currencySign = "$";
}

View File

@ -35,6 +35,7 @@ discourse_subscriptions:
- DKK
- SGD
- ZAR
- CHF
discourse_subscriptions_campaign_enabled:
client: true
default: false