37035-vm/webhooks/stripe.php
2025-12-18 10:12:51 +00:00

22 lines
517 B
PHP

<?php
// Verras Portal - Stripe Webhook Handler
require_once __DIR__ . '/../includes/Database.php';
// TODO: Include Stripe PHP SDK
// TODO: Get webhook endpoint secret from settings
// TODO: Verify the Stripe signature from the request header
// Get the request body
$payload = @file_get_contents('php://input');
$event = null;
// TODO: Handle the event (e.g., 'payment_intent.succeeded')
// - Find the order by 'stripe_payment_intent_id'
// - Update the order status to 'succeeded'
http_response_code(200);