#Sophia Wong

1 messages ยท Page 1 of 1 (latest)

latent shardBOT
rain forum
#

Probably you haven't set up HTTP_STRIPE_SIGNATURE in your server's environment?

granite nymph
#

How to set that ๐Ÿ˜… , in configuration ? set to what? any instructions?

rain forum
#

It depends on your server/host/framework

#

What kind of host are you using? AWS?

granite nymph
#

It's a local environment. I'm testing. I use a Nginx server.

rain forum
granite nymph
#

Oh I know how to set up a env variable. but what's the value I should set it to?

rain forum
granite nymph
#

Should I get the signing secret from this interface? I still don't know how.

rain forum
#

If you are looking at the local listeners, it should outputed in the terminal already

granite nymph
#

What caused a 404 response? I can access http://quiz.test.webhook from a browser. I cannot debug, even the log message I write at the top didn't go to my log file.

rain forum
#

When you access quiz.test.webhook on your browser, you actually making a GET request

#

while Stripe webhook is a POST request

granite nymph
#

oh my god. I realized the route error.

rain forum
#

Oh sorry about HTTP_STRIPE_SIGNATURE, it wasn't the signing secret, it should come automatically from Stripe's request

granite nymph
rain forum
#

Yep now checks your server log

granite nymph
#

Is this because the CoderIgniter framework?

rain forum
#

Well check that line 47

#

Array to String conversion sounds like PHP issue

granite nymph
#

VENDORPATH/stripe/stripe-php/lib/WebhookSignature.php is official library file, I hope nothing wrong with that file ๐Ÿ˜‚

#

Oh Finally! it was because I rewrite payload variable to Codeigniter helper function. Now it's OK.

#

Payload is a string not a jsonlike data. ๐Ÿ˜… Well๏ผŒ I'll dig in more with this webhook. Thank you very much !