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

@@ -65,7 +65,7 @@ abstract class EventNotification
/**
* Helper for constructing an Event Notification. Doesn't perform signature validation, so you
* should use \Stripe\BaseStripeClient#parseEventNotification instead for
* should use \Stripe\BaseStripeClient::parseEventNotification instead for
* initial handling. This is useful in unit tests and working with EventNotifications that you've
* already validated the authenticity of.
*
@@ -78,6 +78,12 @@ abstract class EventNotification
{
$json = json_decode($jsonStr, true);
if (isset($json['object']) && 'event' === $json['object']) {
throw new \Stripe\Exception\UnexpectedValueException(
'You passed a webhook payload to StripeClient::parseEventNotification, which expects an event notification. Use Webhook::constructEvent instead.'
);
}
$class = UnknownEventNotification::class;
$eventNotificationTypes = EventNotificationTypes::v2EventMapping;
if (\array_key_exists($json['type'], $eventNotificationTypes)) {