#stephy

1 messages · Page 1 of 1 (latest)

hoary mirageBOT
rich fox
#

hi, can you elaborate on what you did, what you expected to see, and what you saw instead?

high pelican
#

i catullay want to track the Ach payments that y i created webhooks

#

but i dont know what issue is this

rich fox
#

what's the event ID evt_xxx with the problem?

high pelican
#

where i find this evt_xx id?

rich fox
#

when i check in stripe dashboard
it's on the page in the dashboard

high pelican
rich fox
#

if you click the ... button it has the ID

high pelican
#

evt_1NuZ5FEZ1Pyl4W3k8zuO8E9y

rich fox
#

you can see that your server is responding to us with a HTTP 419 status, you need to examine your server code and configuration to see why it does that.

#

so I'd start by looking at your code and checking any logs that your server is keeping

hoary mirageBOT
high pelican
#

public function handleWebhook(Request $request)
{
$endpoint_secret = env('whsec_xxxxxxxxxxxx');

    $payload = @file_get_contents('php://input');
    $sig_header = $_SERVER['HTTP_STRIPE_SIGNATURE'];
    $event = null;

    try {
        $event = \Stripe\Webhook::constructEvent(
            $payload, $sig_header, $endpoint_secret
        );
    } catch (\UnexpectedValueException $e) {
        // Invalid payload
        return response('', 400);
    } catch (\Stripe\Exception\SignatureVerificationException $e) {
        // Invalid signature
        return response('', 400);
    }

// Handle the event
switch ($event->type) {
case 'checkout.session.completed':
$session = $event->data->object;

        // ... handle other event types
        default:
            echo 'Received unknown event type ' . $event->type;
    }

    return response('');
}
#

this is my server code .. why 419? is this correct?

wooden meadow
#

419 is generally an issue with server configuration, not so much your webhook code

high pelican
#

you mean any security related?

wooden meadow
#

I would recommend speaking to Laravel as this is not related to Stripe really