mirror of
https://github.com/itflow-org/itflow
synced 2026-05-22 18:58:19 +00:00
Bump stripe-php from 19.4.1 to 20.0.0
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user