From 5c113a8f5083098bbd3476f50ee9106fd5582e56 Mon Sep 17 00:00:00 2001 From: Joren Van Onder Date: Tue, 5 Jan 2021 01:02:27 +0000 Subject: [PATCH] [FIX] payment_authorize: send the full reference for s2s transactions invoiceNumber is limited to 20 characters so if the reference in Odoo is longer we send an incomplete reference. This makes it hard to match up S2S payment.transactions in Odoo with their counterparts in the Authorize.net portal. To solve this send the full reference in the description field (which has a max length of 255 characters [1]). [1] https://developer.authorize.net/api/reference/index.html#payment-transactions-charge-a-customer-profile closes odoo/odoo#64179 X-original-commit: 5504ad189f66c63b930ae5a6f5838b8478ba28ec Signed-off-by: jorenvo --- addons/payment_authorize/models/authorize_request.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/payment_authorize/models/authorize_request.py b/addons/payment_authorize/models/authorize_request.py index f46259abf3c..78db4977b05 100644 --- a/addons/payment_authorize/models/authorize_request.py +++ b/addons/payment_authorize/models/authorize_request.py @@ -212,7 +212,8 @@ class AuthorizeAPI(): } }, 'order': { - 'invoiceNumber': reference[:20] + 'invoiceNumber': reference[:20], + 'description': reference[:255], } } @@ -265,7 +266,8 @@ class AuthorizeAPI(): } }, 'order': { - 'invoiceNumber': reference[:20] + 'invoiceNumber': reference[:20], + 'description': reference[:255], } }