Skip to content
Permalink
Browse files

[FIX] payment_ogone: send more 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.
  • Loading branch information...
odony committed Mar 14, 2019
1 parent 6878c9f commit 37d321eec06ba1170d136c5196525eba9de3936c
Showing with 11 additions and 0 deletions.
  1. +11 −0 addons/payment_ogone/models/payment.py
@@ -15,6 +15,7 @@
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

@@ -359,6 +360,16 @@ def ogone_s2s_do_transaction(self, **kwargs):
'PARAMPLUS' : url_encode(param_plus)
}

if self.partner_id:
data['EMAIL'] = self.partner_id.email or ''
data['CN'] = self.partner_id.name or ''
else:
data['EMAIL'] = self.payment_token_id.partner_id.email or ''
data['CN'] = self.payment_token_id.name or self.payment_token_id.partner_id.name or ''

if request:
data['REMOTE_ADDR'] = request.httprequest.remote_addr

if kwargs.get('3d_secure'):
data.update({
'FLAG3D': 'Y',

0 comments on commit 37d321e

Please sign in to comment.
You can’t perform that action at this time.