summaryrefslogtreecommitdiff
path: root/addons/payment_authorize/models
diff options
context:
space:
mode:
authorJoren Van Onder <jov@odoo.com>2021-01-05 01:02:27 +0000
committerJoren Van Onder <jov@odoo.com>2021-01-05 01:09:47 +0000
commit5504ad189f66c63b930ae5a6f5838b8478ba28ec (patch)
tree1da74b3f6e15082202b9a8fbd784116622497193 /addons/payment_authorize/models
parent1e1f55b07790ca31f7fbf43b38bb99644d3a2e93 (diff)
[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#64119 Signed-off-by: jorenvo <jorenvo@users.noreply.github.com>
Diffstat (limited to 'addons/payment_authorize/models')
-rw-r--r--addons/payment_authorize/models/authorize_request.py6
1 files 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],
}
}