summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorOlivier Dony <odo@odoo.com>2018-03-08 17:11:12 +0100
committerOlivier Dony <odo@odoo.com>2018-03-08 17:11:12 +0100
commitc3769b2290df8e9635d2ceed4f05f1ef528e0c22 (patch)
tree595fcfb2e6cf8c1b33c5e951a1ee22521a0b958f /addons/web/static/src
parent247f7db08829919d25b5adaa3645b6341ca70ab0 (diff)
[FIX] payment_ogone: work around ingenico API bug
As of today, Ingenico platform 4.125 has non-uniform handling of the PARAMPLUS parameters that can be passed as part of transaction metadata. This parameter is documented as being parsed[1] as a series of parameter-value pairs, to be passed as extra parameters to the feedback transaction. Based on this, it seems that the PARAMPLUS value should not be urlencoded globally, but each field value should be urlencoded, as the Ingenico side will have to be able to parse and re-emit these individual parameters. In one case we were missing this urlencoding step, so this commit fixes it. Without this, the querydirect.asp API would return invalid XML data when we retrieve the status of a transaction that used a PARAMPLUS value with an '=' sign! For example with PARAMPLUS passed as return_url=/payment/confirm?tx_id=123 the value returned by querydirect.asp would contain the following: (note the invalid extra quote character in the `return_url` param) ``` <?xml version="1.0"?> <ncresponse (...) ED="1234" return_url="/payment/confirm?tx_id="123" SCORING="" SCO_CATEGORY="G"> </ncresponse> ``` Url-encoding the value of the return_url in PARAMPLUS fixes this nonsensical result. However, the Ingenico API then fails to decode the parameter value when passing it to the feedback URL, such as the ACCEPTURL we depend on. As a workaround, since we only pass a single parameter inside PARAMPLUS, we'll url-unquote it afterwards. [1] https://payment-services.ingenico.com/int/en/ogone/support/guides/integration%20guides/e-commerce#feedbackparameters_variablefeedbackparameters
Diffstat (limited to 'addons/web/static/src')
0 files changed, 0 insertions, 0 deletions