Hard to say what's wrong. Where did you get that signature and request body? You might be better off getting help from folks who know WooCommerce, as this issue does not appear to be web2py specific.
Anthony On Thursday, March 15, 2018 at 1:09:31 PM UTC-4, Manuele wrote: > > On 01/03/2018 00:50, Anthony wrote: > > > I think you're on the right track. If you need the original request > > body to verify the signature, request.body.read() should do it. Does > > that not work? > Hi Anthony, > actually no :( it doesn't work, here[1] I tried to extrapolate the very > essential code in order to test a use case. > To obtain the data I used such a web service like "requestb.in" as a > webhook url and saved the woocommerce product. > > running the test the result is: > > $ python -m test > E > ====================================================================== > ERROR: test_authenticate (__main__.TestWoo) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "[...]/woohook/test.py", line 16, in test_authenticate > res = WooHook.check(body, signature, secret) > File "woohook.py", line 23, in check > raise AuthenticationError(result) > AuthenticationError: WNeVWlUGBX6pSusRngDavUWlck6eAhVpTRoTYBbJdYM= > > ---------------------------------------------------------------------- > Ran 1 test in 0.000s > > FAILED (errors=1) > > Any idea or suggestion will be appreciated! > > Cheers > Manuele > > [1] https://gist.github.com/manuelep/b6f6c00b4dec5234ab97229199bb223d > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

