#levystephane

1 messages · Page 1 of 1 (latest)

cosmic ruinBOT
dim sparrow
#

Where do you see this error? Do you have the full error stacktrace?

jovial geyser
#

yes , stripe doen't send stripe signature to my headers at C:\Users\USER\Desktop\Evangzat\vendor\stripe\stripe-php\lib\Exception\SignatureVerificationException.php:28
at Stripe\Exception\SignatureVerificationException::factory('Unable to extract timestamp and signatures from header', '', '')
(C:\Users\USER\Desktop\Evangzat\vendor\stripe\stripe-php\lib\WebhookSignature.php:31)
at Stripe\WebhookSignature::verifyHeader('', '', ```php
class StripeEventValueResolver implements ValueResolverInterface
{
public function __construct(private readonly string $webhookSecret)
{
}

public function resolve(Request $request, ArgumentMetadata $argument): \Generator
{
    if (Event::class !== $argument->getType()) {
        return [];
    }
    yield Webhook::constructEvent(
        $request->getContent(false),
        (string) $request->headers->get('stripe-signature'),
        $this->webhookSecret
    );
}

}

dim sparrow
#

what's the event ID?

jovial geyser
#

stipe-signature is null

dim sparrow
#

No, I mean the ID of the stripe webhook event.

jovial geyser
#

the event id exists I just made a bad copy

dim sparrow
#

Ok, can you share with me the ID?

jovial geyser
#

evt_3OjxyWH670U3d5nO1L3uh4MG

dim sparrow
#

Ok, this error usually happens when an incorrect webhook secret is used.

#

Do you use the webhook secret obtained from your Dashboard?

jovial geyser
#

the one generated by stripe in console isn't it?

dim sparrow
#

No, your Stripe Dashboard.

jovial geyser
#

I have keys in my dashboard but I don't know which one they are. is “Secret signing key”

#

the "webhook secret signing" that I use is the one that was generated by stripe when creating a local endpoint in my dashboard

dim sparrow
#

No, that webhook secrete generated by stripe listen is only for local webhook endpoint, you should use the webhook secret from your Dashboard.

jovial geyser
#

in which part of the dashboard can you find it? and in which section of the code I should inject it?

#

here ? ```php
yield Webhook::constructEvent(
$request->getContent(false),
(string) $request->headers->get('stripe-signature'),
$this->webhookSecret
);
}

dim sparrow
#

Click on the webhook endpoint and get the signing secret by clickin on "reveal" button

jovial geyser
#

so if I understand correctly, it is he who must serve as my Secret webhook when constructing events?