Bump stripe-php from 19.4.1 to 20.0.0

This commit is contained in:
johnnyq
2026-04-08 12:44:45 -04:00
parent 346d7ed9f0
commit 123a581583
160 changed files with 957 additions and 279 deletions

View File

@@ -32,11 +32,17 @@ abstract class Webhook
$jsonError = \json_last_error();
if (null === $data && \JSON_ERROR_NONE !== $jsonError) {
$msg = "Invalid payload: {$payload} "
. "(json_last_error() was {$jsonError})";
. "(json_last_error() was {$jsonError})";
throw new Exception\UnexpectedValueException($msg);
}
if (isset($data['object']) && 'v2.core.event' === $data['object']) {
throw new Exception\UnexpectedValueException(
'You passed an event notification to Webhook::constructEvent, which expects a webhook payload. Use StripeClient::parseEventNotification instead.'
);
}
return Event::constructFrom($data);
}
}