summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Dony <odo@odoo.com>2019-03-14 16:14:36 +0000
committerOlivier Dony <odo@odoo.com>2019-03-22 18:35:28 +0000
commit28a1371035fae9892e1ceeb6c9edd7ddda806ed5 (patch)
treea0a18ba401603374fd6d2d40c6dc0c83d7ba598e
parent6878c9f3424f27df9b07a665f9c0f5ef6e254996 (diff)
[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>
-rw-r--r--addons/payment_ogone/models/payment.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/addons/payment_ogone/models/payment.py b/addons/payment_ogone/models/payment.py
index c78149af1d2..8bf9ee730c2 100644
--- a/addons/payment_ogone/models/payment.py
+++ b/addons/payment_ogone/models/payment.py
@@ -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',