source: main/waeup.ikoba/trunk/src/waeup/ikoba/payments/paypal_currencies.py @ 12388

Last change on this file since 12388 was 12311, checked in by uli, 10 years ago

Merge changes from uli-paypal back into trunk.

File size: 2.5 KB
RevLine 
[12198]1# $Id$
2#
3# Copyright (C) 2014 Uli Fouquet & Henrik Bettermann
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 2 of the License, or
7# (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program; if not, write to the Free Software
16# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17#
18from waeup.ikoba.interfaces import MessageFactory as _
19from waeup.ikoba.interfaces import SimpleIkobaVocabulary
20
21#: The currencies accepted by PayPal.
22#: The entries represent:
23#:   ( title (i18nized), domestic_only, decimals_allowed)
24#:
25#: If `domestic_only` is True, then this currency is supported as a
26#: payment currency and a currency balance for in-country PayPal
27#: accounts only.
28#:
29#: If `decimals_allowed` is *not* True, then you cannot pass amounts
30#: with decimals.
31#:
32#: Status of 2014-12-11
33CURRENCIES = {
34    'AUD': (_(u'Australian dollar'), False, True),
35    'BRL': (_(u'Brazilian real'), True, True),
36    'CAD': (_(u'Canadian dollar'), False, True),
37    'CHF': (_(u'Swiss franc'), False, True),
38    'CZK': (_(u'Czech koruna'), False, True),
39    'DKK': (_(u'Danish krone'), False, True),
40    'EUR': (_(u'Euro'), False, True),
41    'GBP': (_(u'Pound sterling'), False, True),
42    'HKD': (_(u'Hong Kong dollar'), False, True),
43    'HUF': (_(u'Hungarian forint'), False, True),
44    'ILS': (_(u'Israeli new shekel'), False, True),
45    'JPY': (_(u'Japanese yen'), False, False),
46    'MXN': (_(u'Mexican peso'), False, True),
47    'MYR': (_(u'Malaysian ringgit'), True, True),
48    'NOK': (_(u'Norwegian krone'), False, True),
49    'NZD': (_(u'New Zealand dollar'), False, True),
50    'PHP': (_(u'Philippine peso'), False, True),
51    'PLN': (_(u'Polish z\u0142oty'), False, True),
52    'SEK': (_(u'Swedish krona'), False, True),
53    'SGD': (_(u'Singapore dollar'), False, True),
54    'THB': (_(u'Thai baht'), False, True),
55    'TRY': (_(u'Turkish lira'), True, True),
56    'TWD': (_(u'New Taiwan dollar'), False, False),
57    'USD': (_(u'United States dollar'), False, True)
58    }
59
60
61#: A vocabulary of paypal supported currencies
62CURRENCIES_VOCAB = SimpleIkobaVocabulary(
63    *[(val[0], key) for key, val in CURRENCIES.items()])
Note: See TracBrowser for help on using the repository browser.