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:
parent
d82b34080b
commit
1811b5955d
|
@ -53,6 +53,8 @@ module DiscourseSubscriptions
|
||||||
"S$"
|
"S$"
|
||||||
when "zar"
|
when "zar"
|
||||||
"R"
|
"R"
|
||||||
|
when "chf"
|
||||||
|
"CHF"
|
||||||
else
|
else
|
||||||
"$"
|
"$"
|
||||||
end
|
end
|
||||||
|
|
|
@ -43,6 +43,7 @@ export default class AdminPluginsDiscourseSubscriptionsProductsShowPlansShowCont
|
||||||
{ id: "SGD", name: "SGD" },
|
{ id: "SGD", name: "SGD" },
|
||||||
{ id: "JPY", name: "JPY" },
|
{ id: "JPY", name: "JPY" },
|
||||||
{ id: "ZAR", name: "ZAR" },
|
{ id: "ZAR", name: "ZAR" },
|
||||||
|
{ id: "CHF", name: "CHF" },
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,9 @@ export function formatCurrency([currency, amount]) {
|
||||||
case "ZAR":
|
case "ZAR":
|
||||||
currencySign = "R";
|
currencySign = "R";
|
||||||
break;
|
break;
|
||||||
|
case "CHF":
|
||||||
|
currencySign = "CHF";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
currencySign = "$";
|
currencySign = "$";
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ discourse_subscriptions:
|
||||||
- DKK
|
- DKK
|
||||||
- SGD
|
- SGD
|
||||||
- ZAR
|
- ZAR
|
||||||
|
- CHF
|
||||||
discourse_subscriptions_campaign_enabled:
|
discourse_subscriptions_campaign_enabled:
|
||||||
client: true
|
client: true
|
||||||
default: false
|
default: false
|
||||||
|
|
Loading…
Reference in New Issue