From c27da7f7fb78df213ffe468da3e96962ebaf75a1 Mon Sep 17 00:00:00 2001 From: "Hermann D. Schimpf" Date: Thu, 10 Aug 2023 18:36:24 -0400 Subject: [PATCH 1/2] Update composer.json email typo --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4817ba1..556fcc9 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "authors": [ { "name": "Hermann D. Schimpf", - "email": "hhschimpf@hds-solutions.net" + "email": "hschimpf@hds-solutions.net" } ], "require": { From 6bf399646b52592b3f9e7a71fee8dc2d4a38ef7b Mon Sep 17 00:00:00 2001 From: "Hermann D. Schimpf" Date: Tue, 12 Sep 2023 14:46:20 -0400 Subject: [PATCH 2/2] Don't validate SSL when executing requests on test environment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Bancard sometimes just don't work correctly 🤡 --- src/Traits/BuildsRequests.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Traits/BuildsRequests.php b/src/Traits/BuildsRequests.php index dc17854..0327961 100644 --- a/src/Traits/BuildsRequests.php +++ b/src/Traits/BuildsRequests.php @@ -45,6 +45,10 @@ public function request(BancardRequest $request): Response { default => throw new RuntimeException('Unsupported request type'), }; + if (Bancard::isDevelop()) { + $options[ RequestOptions::VERIFY ] = false; + } + try { // execute request through HTTP client $response = $this->client->{$request->getMethod()}($endpoint, $options); @@ -79,6 +83,10 @@ public function request_qr(BancardRequest $request): Response { $options[RequestOptions::JSON] = $request->getOperation(); } + if (Bancard::isDevelop()) { + $options[ RequestOptions::VERIFY ] = false; + } + try { // execute request through HTTP client $response = $this->client_qr->{$request->getMethod()}($request->getEndpoint(), $options);