Files
odoo_source/addons/payment_ogone/models/const.py
T
Arnaud JosetandAntoine Vandevenne 61a02a7330 [REF] payment_ogone: migrate Ogone to the new payment API
In this commit, we take the opportunity to replace the previous unsecure
API with the new FlexCheckout API that implements payment methods
validation in a hosted page. Payment processing is still done with the
DirectLink API.

This commit also renames the module `payment_ingenico` to
`payment_ogone` as well as the referring strings ("Ogone" instead
of "Ingenico", ...).
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-2333029
task-2313907
task-2334015

Co-authored-by: Antoine Vandevenne <anv@odoo.com>
2021-03-30 09:25:51 +02:00

98 lines
2.2 KiB
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
# See https://epayments-support.ingenico.com/en/integration/all-sales-channels/flexcheckout/guide#flexcheckout_integration_guides_sha_out
FLEXCHECKOUT_KEYS = [
'ALIAS.ALIASID',
'ALIAS.NCERROR',
'ALIAS.NCERRORCARDNO',
'ALIAS.NCERRORCN',
'ALIAS.NCERRORCVC',
'ALIAS.NCERRORED',
'ALIAS.ORDERID',
'ALIAS.STATUS',
'ALIAS.STOREPERMANENTLY',
'CARD.BIC',
'CARD.BIN',
'CARD.BRAND',
'CARD.CARDHOLDERNAME',
'CARD.CARDNUMBER',
'CARD.CVC',
'CARD.EXPIRYDATE'
]
# See https://epayments-support.ingenico.com/en/integration-solutions/integrations/directlink#directlink_integration_guides_request_a_new_order
# See https://epayments-support.ingenico.com/en/integration-solutions/integrations/directlink#directlink_integration_guides_order_response
DIRECTLINK_KEYS = [
'AAVADDRESS',
'AAVCHECK',
'AAVMAIL',
'AAVNAME',
'AAVPHONE',
'AAVZIP',
'ACCEPTANCE',
'ALIAS',
'AMOUNT',
'BIC',
'BIN',
'BRAND',
'CARDNO',
'CCCTY',
'CN',
'COLLECTOR_BIC',
'COLLECTOR_IBAN',
'COMPLUS',
'CREATION_STATUS',
'CREDITDEBIT',
'CURRENCY',
'CVCCHECK',
'DCC_COMMPERCENTAGE',
'DCC_CONVAMOUNT',
'DCC_CONVCCY',
'DCC_EXCHRATE',
'DCC_EXCHRATESOURCE',
'DCC_EXCHRATETS',
'DCC_INDICATOR',
'DCC_MARGINPERCENTAGE',
'DCC_VALIDHOURS',
'DEVICEID',
'DIGESTCARDNO',
'ECI',
'ED',
'EMAIL',
'ENCCARDNO',
'FXAMOUNT',
'FXCURRENCY',
'IP',
'IPCTY',
'MANDATEID',
'MOBILEMODE',
'NBREMAILUSAGE',
'NBRIPUSAGE',
'NBRIPUSAGE_ALLTX',
'NBRUSAGE',
'NCERROR',
'ORDERID',
'PAYID',
'PAYIDSUB',
'PAYMENT_REFERENCE',
'PM',
'SCO_CATEGORY',
'SCORING',
'SEQUENCETYPE',
'SIGNDATE',
'STATUS',
'SUBBRAND',
'SUBSCRIPTION_ID',
'TICKET',
'TRXDATE',
'VC',
]
VALID_KEYS = DIRECTLINK_KEYS + FLEXCHECKOUT_KEYS
# See https://epayments-support.ingenico.com/en/get-started/transaction-status-full/
PAYMENT_STATUS_MAPPING = {
'pending': (41, 46, 50, 51, 52, 55, 56, 81, 82, 91, 92, 99), # 46 = 3DS
'done': (5, 8, 9),
'cancel': (1,),
}