mirror of
https://github.com/itflow-org/itflow
synced 2026-04-26 14:27:46 +00:00
Bump stripe-php from 19.4.1 to 20.0.0
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user