Files
odoo_source/addons/payment_flutterwave/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

40 lines
789 B
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
# The currencies supported by Flutterwave, in ISO 4217 format.
# See https://flutterwave.com/us/support/general/what-are-the-currencies-accepted-on-flutterwave.
# Last website update: June 2022.
# Last seen online: 24 November 2022.
SUPPORTED_CURRENCIES = [
'GBP',
'CAD',
'XAF',
'CLP',
'COP',
'EGP',
'EUR',
'GHS',
'GNF',
'KES',
'MWK',
'MAD',
'NGN',
'RWF',
'SLL',
'STD',
'ZAR',
'TZS',
'UGX',
'USD',
'XOF',
'ZMW',
]
# Mapping of transaction states to Flutterwave payment statuses.
PAYMENT_STATUS_MAPPING = {
'pending': ['pending auth'],
'done': ['successful'],
'cancel': ['cancelled'],
'error': ['failed'],
}