Commit Graph

10 Commits

Author SHA1 Message Date
Denis Ledoux 7473f4a3c7 [FIX] payment_buckaroo: return url, payment validation
This revision is related to 6efc371291

The return URL parameter key has changed: The capital letters
are not the same than before.

Besides, send a dict in the `ADD_RETURNDATA` doesn't seem
to be supported by Buckaroo. We therefore no
longer uses a dict but a string to avoid problems.

opw-665697
2016-01-07 13:20:13 +01:00
Martin Trigaux e63cf3c13c [FIX] payment_buckaroo: handle return data
Fixing several issues in the computation of the sha1 signature:

- Removing BRQ_SIGNATURE parameter was only tested in uppercase.
The parameters returned by Buckaroo are case insensitive and we can not ensure
it will be uppercase. Check all keys instead.

- Sorting should be done case insensitive (e.g. 'AA' before 'bb') but the case
must be preserved in the final string to sign.

- The values returned should be URL decoded before being signed.
The value "J.+de+Tester"  should be decoded to "J. de Tester"

- The final string may contain unicode and fail to be used by sha1() method.

Based on Buckaroo Payment Engine 3.0
http://pronamic.nl/wp-content/uploads/2013/04/BPE-3.0-Gateway-HTML.1.02.pdf

Happy New Year Odoo! 🎉 🎆 📯
2015-12-31 15:54:35 +01:00
Martin Trigaux 6efc371291 [FIX] payment_buckaroo: parameters case
Quoting Buckaroo Payment Engine 3.0 Implementation Manual:
Note: parameter names are not case sensitive (both in the request and in the
response). Parameter values are case sensitive.

Using data.get(BRQ_PAYMENT') is unreliable and may break in the future.

Update test to use different case.

opw 665439
2015-12-30 10:09:23 +01:00
Denis Ledoux 11f52c9ee8 [FIX] payment_buckaroo: copy values dict to avoid altering original dict
_buckaroo_generate_digital_sign uses the values dict to generate the shasign
At some point, it alters the dict, it removes BRQ_SIGNATURE, but, as the values dict was not copied, it altered the original dict.
So, the key BRQ_SIGNATURE was not anymore present for methods called after _buckaroo_generate_digital_sign.
For instance, the overriden method form_feedback of website_sale payment
2014-12-19 17:51:19 +01:00
Denis Ledoux 2a10745d60 [FIX] payment_buckaroo: brq_test expects boolean 2014-12-19 11:57:03 +01:00
Denis Ledoux 7a75ab72f3 [FIX] payment_buckaroo: pudb introduced during dbe93ab022
Yes, shame on me. You can laugh.
2014-12-16 15:07:43 +01:00
Denis Ledoux dbe93ab022 [FIX] payment_buckaroo: partner lang can be set to False 2014-12-16 15:05:00 +01:00
Denis Ledoux e2ea82506e [FIX] payment_buckaroo: api expects iso culture as language param
IT looks like this is the code we use in partner lang, by replacing the '_' (underscore) by '-' (dash)
2014-12-16 12:14:16 +01:00
Denis Ledoux e6568e0d8c [FIX] payment_buckaroo: dynamic lang & test params
test flag is set according to acquirer environment
lang is set according to partner language
2014-12-16 12:06:59 +01:00
Thibault Delavallée d22e515d52 [MERGE] [ADD] module: payment_buckaroo acquirer: manage payments using Buckaroo. 2014-05-27 16:57:31 +02:00