Files
odoo_source/addons/payment_sips/const.py
T
Valentin Vallaeys (vava) 90af85c2e4 [IMP] payment(_*): show available currencies for payment providers
Before this commit, the lists of supported currencies by payment
provider were hard-coded in the Python scripts, which made them
unavailable to the users.

With this commit, the implemented initial lists of supported currencies
are displayed on the form view and are editable, because Odoo lists may
not be up-to-date. Empty lists do not trigger any filtering on the
payment providers to access payment methods.

For Authorize.net and Asiapay payment providers, the specific
`(authorize,asiapay)_currency_id` are removed and the generic payment
provider field `available_currency_ids` is restricted to a single-item
list when one of those providers is enabled.

task-2926016

closes odoo/odoo#101018

Related: odoo/enterprise#34158
Related: odoo/documentation#2788
Related: odoo/upgrade#4069
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-01-05 16:51:56 +01:00

67 lines
1.6 KiB
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
# ISO 4217 Data for currencies supported by sips
# NOTE: these are listed on the Atos Wordline SIPS POST documentation page
# at https://documentation.sips.worldline.com/en/WLSIPS.001-GD-Data-dictionary.html#Sips.001_DD_en-Value-currencyCode
# Last seen on: 22 September 2022.
SUPPORTED_CURRENCIES = {
'ARS': '032',
'AUD': '036',
'BHD': '048',
'KHR': '116',
'CAD': '124',
'LKR': '144',
'CNY': '156',
'HRK': '191',
'CZK': '203',
'DKK': '208',
'HKD': '344',
'HUF': '348',
'ISK': '352',
'INR': '356',
'ILS': '376',
'JPY': '392',
'KRW': '410',
'KWD': '414',
'MYR': '458',
'MUR': '480',
'MXN': '484',
'NPR': '524',
'NZD': '554',
'NOK': '578',
'QAR': '634',
'RUB': '643',
'SAR': '682',
'SGD': '702',
'ZAR': '710',
'SEK': '752',
'CHF': '756',
'THB': '764',
'AED': '784',
'TND': '788',
'GBP': '826',
'USD': '840',
'TWD': '901',
'RSD': '941',
'RON': '946',
'TRY': '949',
'XOF': '952',
'XPF': '953',
'BGN': '975',
'EUR': '978',
'UAH': '980',
'PLN': '985',
'BRL': '986',
}
# Mapping of transaction states to Sips response codes.
# See https://documentation.sips.worldline.com/en/WLSIPS.001-GD-Data-dictionary.html#Sips.001_DD_en-Value-currencyCode
RESPONSE_CODES_MAPPING = {
'pending': ('60',),
'done': ('00',),
'cancel': (
'03', '05', '12', '14', '17', '24', '25', '30', '34', '40', '51', '54', '63', '75', '90',
'94', '97', '99'
),
}