Skip to content

Commit

Permalink
Merge pull request #9
Browse files Browse the repository at this point in the history
FIX SSL Validation on development environment
  • Loading branch information
hschimpf authored Sep 12, 2023
2 parents 66f8611 + 6bf3996 commit 6f10914
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"authors": [
{
"name": "Hermann D. Schimpf",
"email": "hhschimpf@hds-solutions.net"
"email": "hschimpf@hds-solutions.net"
}
],
"require": {
Expand Down
8 changes: 8 additions & 0 deletions src/Traits/BuildsRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 6f10914

Please sign in to comment.