oca-ocb-core/odoo-bringout-oca-ocb-payment_nuvei/payment_nuvei/const.py
Ernad Husremovic aee3ee8bf7 add missing payment providers and iot modules for 19.0
Add 19 payment provider modules needed by the sale module:
payment_adyen, payment_aps, payment_asiapay, payment_authorize,
payment_buckaroo, payment_demo, payment_dpo, payment_flutterwave,
payment_iyzico, payment_mercado_pago, payment_mollie, payment_nuvei,
payment_paymob, payment_paypal, payment_razorpay, payment_redsys,
payment_stripe, payment_worldline, payment_xendit

Add 3 IoT modules needed for point_of_sale:
iot_base, iot_box_image, iot_drivers

Note: Stripe test API keys replaced with placeholders.

🤖 assisted by claude
2026-03-09 15:45:22 +01:00

67 lines
1.5 KiB
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
# The currencies supported by Nuvei, in ISO 4217 format.
SUPPORTED_CURRENCIES = [
'ARS',
'BRL',
'CAD',
'CLP',
'COP',
'MXN',
'PEN',
'USD',
'UYU',
]
# The codes of the payment methods to activate when Nuvei is activated.
DEFAULT_PAYMENT_METHOD_CODES = {
# Primary payment methods.
'card',
# Brand payment methods.
'visa',
'mastercard',
'amex',
'discover',
'tarjeta_mercadopago',
'naranja',
}
# Some payment methods require no decimal points no matter the currency
INTEGER_METHODS = [
'webpay',
]
# Some payment methods require first and last name on customers to work.
FULL_NAME_METHODS = [
'boleto',
]
# Mapping of payment method codes to Nuvei codes.
PAYMENT_METHODS_MAPPING = {
'astropay': 'apmgw_Astropay_TEF',
'boleto': 'apmgw_BOLETO',
'card': 'cc_card',
'nuvei_local': 'apmgw_Local_Payments',
'oxxopay': 'apmgw_OXXO_PAY',
'pix': 'apmgw_PIX',
'pse': 'apmgw_PSE',
'spei': 'apmgw_SPEI',
'webpay': 'apmgw_Webpay',
}
# The keys of the values to use in the calculation of the signature.
SIGNATURE_KEYS = [
'totalAmount',
'currency',
'responseTimeStamp',
'PPP_TransactionID',
'Status',
'productId',
]
# Mapping of transaction states to Nuvei payment statuses.
PAYMENT_STATUS_MAPPING = {
'pending': ('pending',),
'done': ('approved', 'ok',),
'error': ('declined', 'error', 'fail',),
}