Merge pull request #9 from StarWar/feature/inr-currency
Feature/inr currency: INR added to supported currencies
This commit is contained in:
commit
83b75ab771
|
@ -42,6 +42,8 @@ class PaymentSerializer < ApplicationSerializer
|
|||
"€"
|
||||
when "gbp"
|
||||
"£"
|
||||
when "inr"
|
||||
"₹"
|
||||
else
|
||||
"$"
|
||||
end
|
||||
|
|
|
@ -3,7 +3,7 @@ import DiscourseURL from "discourse/lib/url";
|
|||
|
||||
export default Ember.Controller.extend({
|
||||
// Also defined in settings.
|
||||
currencies: ["AUD", "CAD", "EUR", "GBP", "USD"],
|
||||
currencies: ["AUD", "CAD", "EUR", "GBP", "USD", "INR"],
|
||||
|
||||
@computed("model.plan.isNew")
|
||||
planFieldDisabled(isNew) {
|
||||
|
|
|
@ -9,6 +9,9 @@ export default Ember.Helper.helper(function(params) {
|
|||
case "GBP":
|
||||
currencySign = "£";
|
||||
break;
|
||||
case "INR":
|
||||
currencySign = "₹";
|
||||
break;
|
||||
default:
|
||||
currencySign = "$";
|
||||
}
|
||||
|
|
|
@ -10,6 +10,10 @@ export default Ember.Helper.helper(function(params) {
|
|||
case "gbp":
|
||||
currencySign = "£";
|
||||
break;
|
||||
case "INR":
|
||||
case "inr":
|
||||
currencySign = "₹";
|
||||
break;
|
||||
default:
|
||||
currencySign = "$";
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ const Plan = EmberObject.extend({
|
|||
|
||||
@computed("amountDollars", "currency", "interval")
|
||||
subscriptionRate(amountDollars, currency, interval) {
|
||||
return `$${amountDollars} ${currency.toUpperCase()} / ${interval}`;
|
||||
return `${amountDollars} ${currency.toUpperCase()} / ${interval}`;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -27,3 +27,4 @@ plugins:
|
|||
- GBP
|
||||
- USD
|
||||
- NZD
|
||||
- INR
|
||||
|
|
Loading…
Reference in New Issue