diff --git a/src/Client.php b/src/Client.php index 0678674..761ab21 100644 --- a/src/Client.php +++ b/src/Client.php @@ -59,6 +59,10 @@ public function push(): array { $mh = curl_multi_init(); + if (!defined('CURLPIPE_MULTIPLEX')) { + define('CURLPIPE_MULTIPLEX', 2); + } + curl_multi_setopt($mh, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX); $handles = []; diff --git a/src/Request.php b/src/Request.php index be2cec8..63fefe4 100644 --- a/src/Request.php +++ b/src/Request.php @@ -63,6 +63,10 @@ public function __construct(Notification $notification, $isProductionEnv) $this->uri = $isProductionEnv ? $this->getProductionUrl($notification) : $this->getSandboxUrl($notification); $this->body = $notification->getPayload()->toJson(); + if (!defined('CURL_HTTP_VERSION_2')) { + define('CURL_HTTP_VERSION_2', 3); + } + $this->options = [ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_2, CURLOPT_URL => $this->uri,