Il 25/03/18 00:51, Patrick Rodrigues ha scritto:
> I was developing the same feature for my website today, and this help
> me a lot.
> In my case I was using Dango Rest Framework, and I was using
> request.data and parsing it to JSON, insted of using request.body.
> But now it works, thank you
Il 16/03/18 15:59, Anthony ha scritto:
> I'm not sure if it includes the entire original HTTP message or just
> the request body, but you can try request.env['wsgi.input']. If that
> doesn't work, web2py (and probably any WSGI-compliant framework) would
> not have access to the original HTTP
>
> Before to definitely fly to other places where to find answers to my
> problem I have one little question related with web2py...
> In woocommerce documentation they say this about request signature:
>
> "X-WC-Webhook-Signature - a base64 encoded HMAC-SHA256 hash of the
> payload."[1]
>
>
On 15/03/2018 22:17, Manuele Pesenti wrote:
You might be better off getting help from folks who know
WooCommerce, as this issue does not appear to be web2py specific.
Yes for sure! Thanks a lot.
M.
Before to definitely fly to other places where to find answers to my
problem I have one
Il 15/03/18 20:21, Anthony ha scritto:
> 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.
>
Yes for sure! Thanks a lot.
M.
--
Resources:
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
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
>
> On Wednesday, February 28, 2018 at 3:50:16 PM UTC-8, 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?
>>
>> Also, I don't think you need the decorator and nested
On 01/03/2018 03:25, Dave S wrote:
Don't you want a dummy parameter on verify_signature(), to prevent it
being a URL-visible function?
well actually it can even stay inside the models not a controller... in
that case if it's not decorate as a service it cannot be visible. right?
On Wednesday, February 28, 2018 at 3:50:16 PM UTC-8, 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?
>
> Also, I don't think you need the decorator and nested
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?
Also, I don't think you need the decorator and nested function. Just write
a simple function and call it at the beginning of the handler:
def
Il 28/02/18 17:10, Anthony ha scritto:
> You could parse the request body yourself, but web2py will do it
> automatically and put the variables in request.post_vars (if JSON is
> posted, its keys will become the keys of request.post_vars).
>
> I'm not sure what you mean by "check the
>
> > It looks like WooCommerce makes a POST request, so the values posted
> > should end up in request.post_vars.
>
> maybe I don't understand... what I think I need to check is the raw body
> of the request... isn't it? How should I check the request.post_vars?
> Isn't it a dictionary or a
Thank Antony,
On 28/02/2018 15:50, Anthony wrote:
The webhook request headers will be in
request.env.http_x_wc_webhook_[specific header] (e.g.,
request.env.http_x_wc_webhook_signature).
ok got it!
It looks like WooCommerce makes a POST request, so the values posted
should end up in
14 matches
Mail list logo