From de870daf438ac5770b2483bdc3b1fb4ea71b4893 Mon Sep 17 00:00:00 2001 From: guilhermecotaGn <75252715+guilhermecotaGn@users.noreply.github.com> Date: Mon, 12 Dec 2022 10:18:39 -0300 Subject: [PATCH] Certificate verification --- src/Gerencianet/Request.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Gerencianet/Request.php b/src/Gerencianet/Request.php index 6ba274f..44c7604 100755 --- a/src/Gerencianet/Request.php +++ b/src/Gerencianet/Request.php @@ -78,7 +78,9 @@ private function verifyCertificate($certificate) public function send($method, $route, $requestOptions) { try { - $requestOptions['cert'] = $this->verifyCertificate($this->config['certificate']); + if (isset($this->config['certificate'])) { + $requestOptions['cert'] = $this->verifyCertificate($this->config['certificate']); + } if (isset($this->config['headers'])) { foreach ($this->config['headers'] as $key => $value) {