Repository: fossasia/open-event-server

Issue:
What are the currencies that we're going to support ?
![capture](https://cloud.githubusercontent.com/assets/2404372/17565571/99c99e5c-5f55-11e6-9a07-a593ed834233.PNG)

Since we're providing two payment Gateways, we'll have to make sure all the currencies that we provide are supported in both the payment gateways. 

The Forex column represents the supported currencies in various Forex APIs. (as we'll need to convert to display the sales on an event-wise basis and for charging the fee)

@mariobehling please share your thoughts regarding this.



Discussion:
@niranjan94 Thanks for pointing this out. My suggestion: If a currency is not supported by Paypal or Stripe still offer the currency, but deactivate/hide the option for the payment gateway. We want to use this system in India and everywhere.

This implementation would also be useful for the future as we could implement payment gateways for specific currencies. There are payment gateways that are widely used but only available in certain countries.

> If a currency is not supported by Paypal or Stripe still offer the currency, but deactivate/hide the option for the payment gateway. 

Cool. Will implement the same.


Resolving patch:
diff --git a/app/__init__.py b/app/__init__.py
--- a/app/__init__.py
+++ b/app/__init__.py
@@ -181,6 +181,11 @@ def currency_symbol_filter(currency_code):
     symbol = CurrencyCodes().get_symbol(currency_code)
     return symbol if symbol else '$'
 
+@app.template_filter('currency_name')
+def currency_name_filter(currency_code):
+    name = CurrencyCodes().get_currency_name(currency_code)
+    return name if name else ''
+
 @app.template_filter('camel_case')
 def camel_case_filter(string):
     return camel_case(string)
diff --git a/app/helpers/static.py b/app/helpers/static.py
--- a/app/helpers/static.py
+++ b/app/helpers/static.py
@@ -183,32 +183,36 @@
     'Taiwan',
     'United Kingdom',
 }
+
+# (currency_code,available_on_paypal,available_on_stripe)
 PAYMENT_CURRENCIES = {
-    'ARS Argentine Peso $',
-    'AUD Australian Dollars A$',
-    'BRL Brazilian Real R$',
-    'CAD Canadian Dollars C$',
-    'CZK Czech Koruna Kč',
-    'DKR Danish Krone Dkr',
-    'EUR Euros €',
-    'HKD Hong Kong Dollar HK$',
-    'HUF Hungarian Forint Ft',
-    'ILS Israeli Shekels ₪',
-    'JPY Japanese Yen ¥',
-    'MYR Malaysian Ringgits RM',
-    'MXN Mexican Pesos Mex$',
-    'NZD New Zealand Dollar NZ$',
-    'NOK Norwegian Krone Nkr',
-    'PHP Philippine Pesos ₱',
-    'PLN Polish Zloty zł',
-    'GBP Pounds Sterling £',
-    'SGD Singapore Dollar SG$',
-    'SEK Swedish Krona Skr',
-    'CHF Swiss Franc Fr',
-    'TWD Taiwan New Dollars NT$',
-    'THB Thai baht ฿',
-    'USD U.S. Dollars $',
+    ('AUD', True, True),
+    ('BRL', True, True),
+    ('CAD', True, True),
+    ('CHF', True, True),
+    ('CZK', True, True),
+    ('DKK', True, True),
+    ('EUR', True, True),
+    ('GBP', True, True),
+    ('HKD', True, True),
+    ('HUF', True, True),
+    ('ILS', True, True),
+    ('INR', False, True),
+    ('JPY', True, True),
+    ('MXN', True, True),
+    ('MYR', True, True),
+    ('NOK', True, True),
+    ('NZD', True, True),
+    ('PHP', True, True),
+    ('PLN', True, True),
+    ('RUB', True, True),
+    ('SEK', True, True),
+    ('SGD', True, True),
+    ('THB', True, True),
+    ('TWD', True, True),
+
 }
+
 # Event Images with Event Topics
 
 DEFAULT_EVENT_IMAGES = {


Test patch: