This commit also renames the module `payment_odoo_by_adyen` to
`payment_odoo` as well as the referring strings ("Odoo Payments" instead
of "Odoo Payments by Adyen", ...).
A dedicated [MOV] commit is not used because neither the [MOV] commit
nor the adapted [REF] would be valid on its own.
See the merge commit for more details.
task-2390665
23 lines
778 B
Python
23 lines
778 B
Python
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
# Adyen-specific mapping of currency codes in ISO 4217 format to the number of decimals.
|
|
# Only currencies for which Adyen does not follow the ISO 4217 norm are listed here.
|
|
# See https://docs.adyen.com/development-resources/currency-codes
|
|
CURRENCY_DECIMALS = {
|
|
'CLP': 2,
|
|
'CVE': 0,
|
|
'IDR': 0,
|
|
'ISK': 2,
|
|
}
|
|
|
|
# Mapping of transaction states to Adyen result codes.
|
|
# See https://docs.adyen.com/checkout/payment-result-codes for the exhaustive list of result codes.
|
|
RESULT_CODES_MAPPING = {
|
|
'pending': (
|
|
'ChallengeShopper', 'IdentifyShopper', 'Pending', 'PresentToShopper', 'Received',
|
|
'RedirectShopper'
|
|
),
|
|
'done': ('Authorised',),
|
|
'cancel': ('Cancelled',),
|
|
}
|