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
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! 🎉🎆📯
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
_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