[FIX] payment_ogone: send client info in S2S tx data
The client IP and email are useful pieces of information for auditing transactions, and are used by the Fraud Detection Module(s) of Ingenico. closes odoo/odoo#32058 Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
This commit is contained in:
@@ -15,6 +15,7 @@ from odoo import api, fields, models, _
|
||||
from odoo.addons.payment.models.payment_acquirer import ValidationError
|
||||
from odoo.addons.payment_ogone.controllers.main import OgoneController
|
||||
from odoo.addons.payment_ogone.data import ogone
|
||||
from odoo.http import request
|
||||
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT, ustr
|
||||
from odoo.tools.float_utils import float_compare, float_repr, float_round
|
||||
|
||||
@@ -356,9 +357,14 @@ class PaymentTxOgone(models.Model):
|
||||
'ECI': 9, # Recurring (from eCommerce)
|
||||
'ALIAS': self.payment_token_id.acquirer_ref,
|
||||
'RTIMEOUT': 30,
|
||||
'PARAMPLUS' : url_encode(param_plus)
|
||||
'PARAMPLUS': url_encode(param_plus),
|
||||
'EMAIL': self.partner_id.email or '',
|
||||
'CN': self.partner_id.name or '',
|
||||
}
|
||||
|
||||
if request:
|
||||
data['REMOTE_ADDR'] = request.httprequest.remote_addr
|
||||
|
||||
if kwargs.get('3d_secure'):
|
||||
data.update({
|
||||
'FLAG3D': 'Y',
|
||||
|
||||
Reference in New Issue
Block a user