#joyful_gull_14244
1 messages · Page 1 of 1 (latest)
Hi
Did you try to inspect the headers ?
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
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
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
Did you make a test using a sample curl or https call ?
and check if you managed to fetch the headers ?
yes I used curl to get the headers and the getAllHeaders() function too but I still don't have a header stripe
how are you testing your webhook?
allow_headers: ['Content-Type', 'Authorization', 'STRIPE_SIGNATURE']
isn't itHTTP_STRIPE_SIGNATURE
I test my webhook by updating its url on my browser
I'm not sure I follow
I use the url of my webhook on my browser, is this the correct method?
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
ok I understand
this is the recommended way to testing your webhook https://stripe.com/docs/webhooks#test-webhook
perfect, I'll test that and I'll tell you
let me know if you need any more help
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!
let me know if you need any more help
okay thank you