#kuzma-webhook

1 messages · Page 1 of 1 (latest)

hidden condor
#

hi! what's the event ID evt_xxx of the one that fails?

iron otter
#

sorry

#

evt_1KTPk1Ld5mV3MHWM1RjJq1pI

hidden condor
#

that looks like the successful one

#

do you have the failing one?

iron otter
#

evt_1KTPCoLd5mV3MHWMCBVArlx4

#

This event has message "No signatures found matching the expected signature for payload"

hidden condor
#

are you sure you're using the right signing secret? can you share the exact code you use to read the event/check the signature?

iron otter
#

Do you mean webhook secret code?

hidden condor
#

I mean the PHP code you're using that tries to check the signature and returns this error.

iron otter
#

This error raises from your library. We are not affecting on the result of this error

hidden condor
#

yes I know how our library works

#

I mean, can you share the code for how you read the HTTP POST body that your server receives and then passes that payload to the constructEvent function?

iron otter
#

That`s the part of yii2 framework Request

     * Returns the raw HTTP request body.
     * @return string the request body
     */
    public function getRawBody()
    {
        if ($this->_rawBody === null) {
            $this->_rawBody = file_get_contents('php://input');
        }

        return $this->_rawBody;
    }```
#

and headers to
return $request->getHeaders()->get('stripe-signature');

hidden condor
#

hmm ok, seems normal enough

#

not really sure, I'd suggest adding more logging to debug this