#joyful_gull_14244

1 messages · Page 1 of 1 (latest)

deft spindleBOT
sick rune
#

Hi
Did you try to inspect the headers ?

thorn otter
#

Hi @sick rune
yes, I don't have any stripe parameters in the headers, on the other hand, in the server parameters, I have the api key and the stripe webhook key but not the signature

sick rune
#

You need to make sure how to fetch header values using Symphony

#

you can do some tests using curl with custom headers

#

and double check that you manage to get the header value on your Symphony project

thorn otter
#

in nelmio_cors.yaml I added allow_headers: ['Content-Type', 'Authorization', 'STRIPE_SIGNATURE'] so the header is supposed to be authorized, but in the webhook I still don't receive it

deft spindleBOT
sick rune
#

Did you make a test using a sample curl or https call ?

#

and check if you managed to fetch the headers ?

thorn otter
#

yes I used curl to get the headers and the getAllHeaders() function too but I still don't have a header stripe

supple burrow
#

how are you testing your webhook?

#

allow_headers: ['Content-Type', 'Authorization', 'STRIPE_SIGNATURE']
isn't it HTTP_STRIPE_SIGNATURE

thorn otter
#

I tried both and neither works

#

I test my webhook by updating its url on my browser

supple burrow
#

I test my webhook by updating its url on my browser
I'm not sure I follow

thorn otter
#

I use the url of my webhook on my browser, is this the correct method?

supple burrow
#

no that's not

#

this is why you're not receiving the headers because it's not Stripe that is sending you the request but yourself

#

and one more thing

#

your webhook endpoint should be setup to handle POST requests not GET requests

thorn otter
#

ok I understand

supple burrow
thorn otter
#

perfect, I'll test that and I'll tell you

supple burrow
#

let me know if you need any more help

thorn otter
#

now I understand better, the webhook can only be tested in CLI by simulating events, this gives me good results, now I have to add actions which will follow the success of the payment to ensure that everything works well
I will tell you in the afternoon if everything is going well!
thank you very much for your help, you are a hero!

supple burrow
#

let me know if you need any more help

thorn otter
#

okay thank you