Files
odoo_source/addons/payment_authorize/models
Atchuthan Ubendran 40c2a124a1 [FIX] payment_authorize: change order of keys
- Select 'capture manually' in Authorize.net Payment acquirer
- Do an online transaction
- Click on the Capture button at Payment transaction windows.

An error message is returned:

The element 'transactionRequest' in namespace
'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element
'amount' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List
of possible elements expected: 'splitTenderId, order, lineItems...'.

This because the keys `amount` and `refTransId` are inverted in
`createTransactionRequest`:

https://developer.authorize.net/api/reference/index.html#payment-transactions-capture-a-previously-authorized-amount

A simple fix is to swtich them. Indeed, the Odoo 13.0 requirements is
Python 3.6+, in which the keys order at iteration is the insertion
order. Although this was officially part of the specification in 3.7,
the change is already available in 3.6.

Closes #45891
opw-2201667

closes odoo/odoo#46206

X-original-commit: ae3885295795f8c150bd40af266004016fd300c5
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-25 10:34:36 +00:00
..